pycharm生成的allure测试报告如何查看本地的index.html文件?

pycharm生成的allure测试报告应该是通过服务启动查看,但是如果把这个文件保存到本地查看,直接打开页面无内容
可以使用allure-combine工具实现本地正常打开

from allure_combine import combine_allure

pytest框架执行入口文件:

args = ["-vs", "--capture=sys",  
        "--clean-alluredir",  
        "--alluredir=allure-results", 
        ]
pytest.main(args)
os.system("allure generate -c -o allure-report-html")
combine_allure("./allure-report-html")
posted @ 2024-07-19 02:27  cherish-github123  阅读(8)  评论(0编辑  收藏  举报