jenkins中添加allure插件使用

安装 jdk1.8(在jenkins中不配置,只为了形成allure的运行环境)
下载allure,配置环境变量
pytest插件的安装:
Allure插件的安装:

pip install allure-pytest

 

在jenkins中加入插件:

Allure jenkins Plugin

 

全局工具配置:
添加:Allure Commandline
+allure,+安装目录
构建后:
Allure report
指定生成json文件路径results; reports/data
生成报告的地方reports; reports/html
应用,保存

生成报告的命令:
pytest -sv uwb --alluredir=../reports/data (生成改文件加,为json内容he)
allure generate ../reports/data -o ../reports/html --clean (生成离线的测试报告)
在allure report设置:
results:reports/data
reports:reports/html
--clean或-c:对每次生成的报告之前把旧的报告清理掉

posted @ 2021-10-22 17:34  清风吹拂啊狂风肆虐  阅读(337)  评论(0编辑  收藏  举报