我正在编写一个 Pythonic 工具来验证某个系统的正确性。每个验证都编写为 Python unittest
,报告如下所示:
test_exclude_list_not_empty (__main__.TestRepoLists)
Assert the the exclude list is not empty ... ok
test_include_list_not_empty (__main__.TestRepoLists)
Assert the the include list is not empty ... ok
test_repo_list_not_empty (__main__.TestRepoLists)
Assert the the repo list is not empty ... ok
在我看来,这种格式很难阅读,尤其是对于非 Python 爱好者。是否有任何报告生成器可以以漂亮的表格形式生成报告,例如:
+----------------------------------------------------------------+-----------+
| Test | Status |
+----------------------------------------------------------------+-----------+
| Assert the the exclude list is not empty | OK |
| Assert the the include list is not empty | OK |
| Assert the the repo list is not empty | OK |
| All the items in the include list should be in the repo list | OK |
+----------------------------------------------------------------+-----------+
澄清测试套件在远程终端上运行,所以我更喜欢命令行报告工具。