刚接触pytest框架,通过allure输出报告,用例执行成功后,打开报告文件index.html,页面显示为空,打开console,有报错“Uncaught TypeError: P.a.registerLanguage is not a function”,“Uncaught ReferenceError: allure is not defined”,搜索发现是allure.zip的版本和allure-pytest版本不一致的原因,重新下载了allure.zip为2.9版本。
但是发现打开index.html还是报错,重新启动pycharm也没有解决。试了几次,发现需要重新启动电脑,重新生成报告,再次打开就正常了。