【问题表现】
双击html打开allure报告显示loading和404
【解决方案一】
运行下列代码即可得到allure渲染后的报告
import os
import pytest
if __name__ == '__main__':
# 执行pytest用例,并生成allure报告
pytest.main(['-s', '-v', '--lf', '-m', 'test', r"--alluredir=./report/reportDetail/"])
os.system("allure generate ./report/reportDetail/ -o ./report/report/ --clean")
os.system("allure open ./report/report/ ") # 运行完直接打开报告
【解决方案二】
1、执行完测试用例后
2、index.html文件右击,选择Open In–》Browser–》Chrome
【解决方案三】
1、执行完测试用例后
2、在terminal输入allure open ./report/report/,执行命令。