pytest 和 allure 踩的坑

发布时间 2023-05-07 17:36:33作者: 蛋尼

近期用Pytest+Appium搭建App自动化,报告用Allure生成,期间遇到一些问题,记录下

pytest.main 执行的时候,拉不到对应的case

原因:测试class不是Test开头。要求文件名、类、测试方法,都以test开头

附:pytest.main 常用参数

生成的allure报告,mac本地无法预览

解决方案:在html目录起本地http服务

sudo npm install http-server -global
cd /Users/zmfflying/Desktop/dist
http-server -p8000

转自:https://www.jianshu.com/p/f03c4d35ebf6