web自动化之 discover收集用例

from unittest import defaultTestLoader
from common import contants
from common import HTMLTestRunner



discover = defaultTestLoader.discover(contants.case_dir, pattern='test*.py')

with open(contants.html_file, 'wb')as fp:
runner = HTMLTestRunner.HTMLTestRunner(stream=fp, verbosity=1, title='web自动化报告', description='测试登录')
runner.run(discover)
上一篇:moco 响应信息从 外部文件读取demo


下一篇:超详细Gitlab Runner环境配置中文教程