forked from DxvLwRYF/apiAutoTest
update run.py.
This commit is contained in:
parent
f86cbd10a9
commit
9706f6cd1d
10
run.py
10
run.py
|
@ -25,7 +25,15 @@ def run():
|
||||||
if os.path.exists('report/'):
|
if os.path.exists('report/'):
|
||||||
shutil.rmtree(path='report/')
|
shutil.rmtree(path='report/')
|
||||||
logger.add(logfile, enqueue=True, encoding='utf-8')
|
logger.add(logfile, enqueue=True, encoding='utf-8')
|
||||||
logger.info('开始测试...')
|
logger.info("""
|
||||||
|
_ _ _ _____ _
|
||||||
|
__ _ _ __ (_) / \ _ _| |_ __|_ _|__ ___| |_
|
||||||
|
/ _` | '_ \| | / _ \| | | | __/ _ \| |/ _ \/ __| __|
|
||||||
|
| (_| | |_) | |/ ___ \ |_| | || (_) | | __/\__ \ |_
|
||||||
|
\__,_| .__/|_/_/ \_\__,_|\__\___/|_|\___||___/\__|
|
||||||
|
|_|
|
||||||
|
Starting ... ... ...
|
||||||
|
""")
|
||||||
pytest.main(args=['test/test_api.py', f'--alluredir={report}/data'])
|
pytest.main(args=['test/test_api.py', f'--alluredir={report}/data'])
|
||||||
# 自动以服务形式打开报告
|
# 自动以服务形式打开报告
|
||||||
# os.system(f'allure serve {report}/data')
|
# os.system(f'allure serve {report}/data')
|
||||||
|
|
Loading…
Reference in New Issue