allure生成测试报告报错“Could not read test result file”

报错内容大概就是错没有找到某个json文件,实际是有的。
Could not read test result file .\report\json_report\23aa609b-f8c5-4842-b2fe-4179820f4e6d-result.json

可能的原因:
allure生成json数据是用pytest实现的
addopts = -s --alluredir=./report/json_report

然后生成html文件是用cmd命令实现的
os.system(r"allure generate .\report\json_report -o .\report\html_report --clean")

这边发现使用pip install 下载的allure-pytest 版本为 2.15.0
在这里插入图片描述

cmd看一下allure版本
在这里插入图片描述
两版本不一样

pycham重新安装一下allure-pytest,指定一下版本为2.14.x
在这里插入图片描述
重新运行,ok了
Report successfully generated to .\report\html_report

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值