显示两次测试覆盖率运行的差异 [英] Show the differences in two test-coverage runs
问题描述
我正在为一些旧的不知名的代码编写测试。我发现coverage.py是一个有用的工具,可以帮助我确定接下来要编写的测试。当我改进测试时,我想看看我是如何影响我们的覆盖范围的。
I'm in the process of writing tests for some old and disowned code. I've found coverage.py to be a useful tool in helping me decide which test to write next. As I improve our testing I'd like to see how I've affected our coverage.
当前,我正在通过两次提起html报告来做到这一点并排浏览器窗口,并在视觉上寻找差异。这似乎很粗糙。你们中有人有更好的解决方案吗?
Currently I'm doing this by bringing up the html report twice, in side-by-side browser windows, and visually looking for differences. This seems very crude. Do any of you have a better solution?
我发现 z3c.coverage ,并且在努力使zope-testrunner与我们的测试一起使用后,发现它仅报告回归,而不报告改进。我可以将输入作为反向输入,以使改进看起来像回归,但这样会使其他人感到困惑。
I found z3c.coverage, and after struggling to get zope-testrunner working with our tests, found that it only reports on regressions, not improvements. I could give the inputs as reverse, so that improvements look like regressions, but that will be quite confusing to present to others.
推荐答案
Coverage.py没有差异功能。听起来不错,想提供补丁吗? :)
Coverage.py doesn't have a diff feature. Sounds cool though, want to provide a patch? :)
这篇关于显示两次测试覆盖率运行的差异的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!