我可以获得专门针对用户故事的单元测试覆盖率报告吗?
我们正在使用 cobertura 来显示我们的单元测试覆盖率,我们才刚刚开始使用它(我是运行这个团队的新手),并且我们当前的单元测试覆盖率非常低,而不是仅仅进入并找到我们需要得到这个的区域覆盖率提高 我想首先强制所有新用户故事的覆盖率超过 80%。
cobertura 可以向我显示受该用户故事影响的区域的单元测试覆盖率,但据我所知,它无法向我显示该故事的实际单元测试覆盖率。
请记住,我来自 QA 背景,我曾管理过几次开发团队,但没有实际的编码经验。
谢谢
We are using cobertura to show our unit test coverage, we have only just started using it (Im new to running this team) and our current unit test coverage is very low, rather than just go in and find areas where we need to get this coverage up I want to start it off by enforcing that all new user stories have over 80% coverage.
cobertura can show me the unit test coverage on areas affected by that user story but as far as I am aware it cant show me what the actual unit test coverage is for that story.
Bear in mind I come from a QA background, I have managed development teams a few times but dont have the actual coding experience.
thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
由于用户故事不直接映射到代码(故事之间会共享代码的许多部分,并且用户故事的代码通常分布在整个应用程序中),因此这通常是不可能的。
Since user stories don't map directly to code (there will be many parts of the code shared between stories, and often the code for a user story is distributed throughout the application), this is generally impossible.
这是线路覆盖和功能覆盖之间的传统区别。实现高线路覆盖率很有趣(80% 的目标似乎是一个很好的起点),但这还不够:重要的是功能覆盖率,并且没有自动化工具可以正确测量它。
有关更多详细信息,请参阅我的回答,其中涵盖了这一点。
This is the traditional distinction between line coverage and functional coverage. It is interesting to achieve a high line coverage (your target of 80% seems like a good starting point), but this is not enough: what matters is functional coverage, and there is no automated tool that will properly measure that.
For more details, please see my answer here, which covers that.
是的,您可以获得特定于用户故事的代码覆盖率,但我认为没有任何现成的解决方案可用。
您可以从 SCM 存储库提交中找到用户故事更改的代码,并将其映射到代码覆盖率工具输出,以查找用户故事覆盖的代码百分比。
Yes you can get code coverage specific to user story but I do not think that there is any out of the box solution available.
You can find code changed for a user story from SCM repository commits and map it to code coverage tool output to find the percentage of code covered for your user story.