2 Star 24 Fork 7

陈晨/webUI自动化框架python+selenium+pytest+allure+poium+loguru

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
run.py 1.13 KB
一键复制 编辑 原始数据 按行查看 历史
陈晨 提交于 2022-08-22 01:22 +08:00 . 补充多线程执行功能
# -*- coding: utf-8 -*-
import os
import time
import pytest
from shutil import copyfile
from common.config import PathConfig
from tools.date_tool.get_date import GetDate
now_time = GetDate().get_now_time("%Y-%m-%d_%H-%M_%S")
root_path = PathConfig.root_path # 项目根路径
cases_path = PathConfig.case_path # 测试用例路径
common_path = PathConfig.common_path # 公共文件路径
report_path = os.path.join(PathConfig.report_path, now_time+os.sep) # 测试报告路径
html_path = os.path.join(report_path, 'html') # 测试报告html文件夹路径
now_time = time.strftime("%Y-%m-%d %H.%M.%S", time.localtime())
def run():
pytest.main(["-v", "-s",
r"--alluredir=" + report_path,
"--clean-alluredir"])
# 复制测试环境信息到测试报告目录下
# os.mkdir(report_path)
copyfile(common_path + "environment.properties", report_path + "environment.properties")
os.system('allure generate ' + report_path + ' --clean -o ' + html_path) # -o 参数是将报告内容保存到指定的文件夹下 -c接目录,清理上次的报告数据
if __name__ == '__main__':
run()
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Python
1
https://gitee.com/chen-LinQiang/ui-automation-framework.git
git@gitee.com:chen-LinQiang/ui-automation-framework.git
chen-LinQiang
ui-automation-framework
webUI自动化框架python+selenium+pytest+allure+poium+loguru
master

搜索帮助