1.下載allure
https://github.com/allure-framework/allure2/releases
2.配置allure系統環境變量
3.cmd窗口驗證環境變量配置是否成功
4.安裝allure-pytest:
pip install allure-pytest
5.運行用例時使用allure生成報告
6.查看測試報告:
命令行輸入 :allure serve 生成報告的目錄
注意:如果安裝了pytest-allure-adaptor,在pycharm使用allure時會報錯:module 'pytest' has no attribute 'allure'或者AttributeError: module 'allure' has no attribute 'severity_level'
此時需要先卸載adaptor: pip uninstall pytest-allure-adaptor
allure安裝配置:https://www.jianshu.com/p/5735d388faa2
allure生成報告:https://www.cnblogs.com/yoyoblogs/p/11447571.html