26 lines
833 B
Python
26 lines
833 B
Python
'''
|
||
Author: shenghao.xu
|
||
Date: 2023-04-04 08:23:39
|
||
LastEditors: shenghao.xu
|
||
LastEditTime: 2023-06-06 14:08:25
|
||
Description:
|
||
email:545403892@qq.com
|
||
Copyright (c) 2023 by shenghao.xu, All Rights Reserved.
|
||
'''
|
||
|
||
import unittest
|
||
from unittestreport import TestRunner
|
||
import os
|
||
|
||
|
||
case_path = "test/"
|
||
suite = unittest . defaultTestLoader . discover(case_path, pattern="test_*.py")
|
||
BasePath = os.path.dirname(__file__) # 获取当前文件所在路径
|
||
|
||
if __name__ == "__main__":
|
||
fp = BasePath + "\\report"
|
||
# filename为文件名称,report_dir报告输出位置,title测试标题,tester测试测试人员,desc描述
|
||
runner = TestRunner(suite, filename="report.html", report_dir=fp,
|
||
title="EPM测试报告", tester="许晟昊", desc="许晟昊执行的测试用例", templates=2)
|
||
runner.run()
|