Python Unit Test Report
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Python Unit Test Report相关的知识,希望对你有一定的参考价值。
?????????amp port mod alt str method you The loader
1.Download HTMLTestRunner.py ,add it directly into your working directory as a module (if use python3, need some adjustment )
2.Create our unit test files structures( example for learning)
??????Test suites -> testcase1->test11.py,test12.py ...
??????Test suites -> testcase2->test21.py,test22.py ...
3.Use unittest.defaultTestLoader.discover to load test suites ( can also use other load method ,depend on the test suites structues )
report :
以上是关于Python Unit Test Report的主要内容,如果未能解决你的问题,请参考以下文章
Python Unit Test - Test Report: HTMLTestRunner -1
如何为仅更新全局dict类型变量的函数编写unit_test-Python(pytest)