pytest-allure测试报告
生活随笔
收集整理的這篇文章主要介紹了
pytest-allure测试报告
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
該類型的警告大多屬于版本更新時,所使用的方法過時的原因,可以在該方法的說明出查找替換的方法
1、安裝allure
a)下載allure.zip https://github.com/allure-framework/allure2?
b)添加allure到環境變量PATH(\安裝路徑\allure\bin)
c)??驗證allure環境配置成功:命令行cmd,輸入allure:2、pytest安裝插件
pip install allure-pytest3、pytest生成allure測試報告的命令參數
--alluredir=XX/my_allure_results4、查看allure的測試報告命令
allure serve [allure報告目錄]?常見問題解決:
1、運行報錯,提示:“ValueError: option names {'--alluredir'} already added”
產生問題的主要原因
? ?pytest-allure-adaptor與allure-pytest的alluredir都被引用造成沖突解決辦法
? ?需要卸載不用的包 :pip uninstall pytest-allure-adaptor2、pytest安裝的插件:有2種 pip install pytest-allure-adaptor、pip install allure-pytest
轉載于:https://www.cnblogs.com/xyao1/p/10930457.html
總結
以上是生活随笔為你收集整理的pytest-allure测试报告的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: uva 10048 Audiophobi
- 下一篇: LeetCode15:三数之和(转载思路