ARTICLE DETAIL

建站实战干货

来自一线的建站与推广经验沉淀,每一条都经过真实交付验证。

生成allure报告出现:ALLURE REPORT UNKNOWN

2026/8/25 22:25:02 拓冰建站 浏览量
生成allure报告出现:ALLURE REPORT UNKNOWN

问题:点击浏览器查看时无法查看到报告

错误代码:

if __name__ == "__main__":pytest.main(['./test_study/test_fixture.py'])os.system("allure generate ./temps -o ./temps --clean")

结果导向:

解决:因为将两个生成目录写成了同一个

# ./temps 表示用来生成html的JSON临时文件目录
# ./reports 表示html文件生成目录
if __name__ == "__main__":pytest.main(['./test_study/test_fixture.py'])os.system("allure generate ./temps -o ./reports --clean")