pytest 生成 allure报告(含4要素的对应版本,兼容)

python 3.7
pytest 6.0.1
allure 2.8.0
allure-pytest 2.8.18

乞丐版本自动化框架

test_sum.py文件截图

sum_data.py文件截图(用变量储存还是比较方便调用)

这个在pycharm(在test_sum.py文件中)控制台输入
生产报告的第一步pytest --alluredir=automation_test_frame est_allure eport
等于号后面是相对路径

会得到上面一坨josn文件

这个在cmd中输入
allure serve D:pythonautomation_test_frame est_allure eport
这后面是绝对路径

然后就得到这玩意

原文地址:https://www.cnblogs.com/lly-lcf/p/13932714.html