import unittest,time
from HTMLTestRunner import HTMLTestRunner
if __name__ == '__main__':
# 使用TestSuite类来组织测试用例
suite = unittest.defaultTestLoader.discover('../unittest/',pattern='test_*.py')
# 使用HTMLTestRunner类来执行测试用例
time_str = time.strftime('%Y%m%d_%H%M%S')
with open('../test_result/'+time_str+'.html','wb') as f:
runner = HTMLTestRunner(stream=f,title='版本1的冒烟测试',description='测试登录和注册两个模块',)
runner.run(suite)
runner2
最新推荐文章于 2024-11-02 16:28:26 发布