epm/User/test/run.py

26 lines
833 B
Python
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

'''
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()