- 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 :
来源: http://www.bubuko.com/infodetail-2964795.html