Python 采用 pytest-parallel 多线程时,为什么生成不了 allure 报告。

ufo · 2022年07月18日 · 最后由 ufo 回复于 2022年07月19日 · 5046 次阅读

我采用的参数为:--workers=1 --tests-per-worker 1,在 pytest.ini 中增加了这个参数,执行 pytest.main(),然后采用
allure generate ' + allure_path + ' -o ' + reports_path + ' --clean' 生成对应的测试报告,却无法生成测试报告,allure_path 也为空,把这个参数去掉,却可以生成。
麻烦大佬们解答下,感谢。

共收到 1 条回复 时间 点赞
ufo #1 · 2022年07月19日 Author

在社区帖上面找到了答案,采用 pytest-parallel 多线程时,目前不支持 allure 报告,这个是一个缺陷,我用 pytest-html 替代了。
地址:
https://github.com/browsertron/pytest-parallel/issues/28#issuecomment-535345123

需要 登录 后方可回复, 如果你还没有账号请点击这里 注册