一、Allure下载
1.在官网下载安装包
官网:https://qameta.io/allure-report/
2.解压
复制bin目录 D:\allure-2.17.3\bin
3.配置环境变量
高级系统配置-环境变量-系统变量-path
4.查看是否安装成功
在cmd中运行 allure命令,如下,代表安装成功
二、allure环境安装
pip install pytest==4.5.0 --index-url https://pypi.douban.com/simple
pip install allure-pytest==2.8.6 --index-url https://pypi.douban.com/simple
三、allure生成报告
pytest --alluredir ./report/allure_raw
指定测试报告存放路径 ./report/allure_raw
当前目录下report文件下的report/allure_raw
四、allure运行报告
allure serve report/allure_raw