标签:ase st3 ant nts 获取 html common cas att
import sys
sys.path.append(‘./‘) #获取project 根目录,jenkits执行需要
print(sys.path)
import HTMLTestRunnerNew
import unittest
from week_9.common import contants
discover = unittest.defaultTestLoader.discover(contants.case_dir, pattern=‘test*.py‘)
with open(contants.reports_html+‘/test3.html‘, ‘wb+‘) as files:
runner = HTMLTestRunnerNew.HTMLTestRunner(
stream=files,
verbosity=1,
title=‘20190519py15测试报告‘,
description=‘webservice借口测试报告‘,
tester=‘冥鴻‘)
runner.run(discover)
标签:ase st3 ant nts 获取 html common cas att
原文地址:https://www.cnblogs.com/minghong/p/10915332.html