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)
标签:web,contants,HTMLTestRunner,runner,discover,用例,import 来源: https://www.cnblogs.com/sophia-985935365/p/12640032.html