您的项目的代码覆盖率是多少? [英] What is the code-coverage percentage on your project?
问题描述
您的项目中%的代码覆盖率是多少?我想知道为什么。
What is the % code-coverage on your project? I'm curious as to reasons why.
开发团队对此感到满意吗?如果没有,阻碍增长的是什么?
Is the dev team happy with it? If not, what stands in the way from increasing it?
斯图尔特·哈洛韦(Stuart Halloway)的项目的目标是100%(否则构建会中断!)。
Stuart Halloway is one whose projects aim for 100% (or else the build breaks!). Is anyone at that level?
我们处于痛苦的25%,但渴望获得80-90%的新代码。我们有遗留的代码,我们决定在它消失时不予处理(我们正在积极地重写)。
We are at a painful 25% but aspire to 80-90% for new code. We have legacy code that we have decided to leave alone as it evaporates (we are actively re-writing).
推荐答案
我们运行代码覆盖率达到85%,但低于此水平则不会破坏构建。我认为将代码覆盖率用作重要指标是一种危险的做法。仅仅因为测试中涵盖了某些内容,并不意味着涵盖范围是任何好处。我们尝试将其用作薄弱环节的指导,而不是硬道理。
We run at 85% code coverage, but falling below it does not break the build. I think using code coverage as an important metric is a dangerous practice. Just because something is covered in a test does not mean the coverage is any good. We try to use it as guidance for the areas we are weakly covered, not as a hard fact.
这篇关于您的项目的代码覆盖率是多少?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!