解决pytest+Allure 产生报告后直接打开index.html 无内容
目前暂时无法直接打开Allure 的报告 只能通过allure服务打开报告数据
args = ['-vs', f'-m {self.marker.lower()}', f'--alluredir={self.allure_results_Path}',
f'{os.path.dirname(__file__)}']
pytest.main(args=args)
os.system(f'allure serve {self.allure_results_Path}')
由于,是系统直接调用allure服务,记得将allure文件夹的位置添加到系统变量
{self.allure_results_Path}是allure生成报告的地址。