测试覆盖率 【pytest 统计】请问怎么 “统计 pytest 中用例的成功和失败数量”

cooling · April 05, 2021 · Last by cooling replied at April 05, 2021 · 2785 hits

【说明】
1.集成了 allure+jenins【需求:钉钉通知里面需要 “测试执行的成功与失败统计”,不考虑 pytest-cov】

共收到 4 条回复 时间 点赞

这个自己写个脚本去解析结果文件不就行了吗

有一个插件:pytest-json-report 可以使用。


google 下, pytest 基本你想要的功能,都有已实现的插件。

cooling #3 · April 05, 2021 Author
aabbcc 回复

我直接去解析 allure-reports 下的 summary.json,这样简单的实现了需求。谢谢,大哥的思路

cooling #4 · April 05, 2021 Author
0x7C00 回复

谢谢,大哥的思路,有空我去看看这个插件

cooling 关闭了讨论 05 Apr 18:36
需要 Sign In 后方可回复, 如果你还没有账号请点击这里 Sign Up