Python Unit Test Report

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 :



猜你喜欢

转载自www.cnblogs.com/cometous/p/10405814.html