Ensure minimal coverage on new Subversion commits(确保对新 Subversion 提交的覆盖最小化)
问题描述
我们有一个庞大的项目,几乎没有单元测试.从现在开始,我想确保开发人员在提交新功能(或错误!)时不会覆盖相应的单元测试.
We have a massive project with almost no unit tests at all. I would like to ensure from now on that the developers commit new features (or bugs!) without minimal coverage for corresponding unit tests.
有什么方法可以强制执行?
What are some ways to enforce this?
我们使用很多工具,所以也许我可以使用插件(jira、greenhopper、fisheye、sonar、hudson).我还在考虑可能是 Subversion 预提交挂钩、jira 的提交接受插件或类似的东西.
We use many tools, so perhaps I can use a plugin (jira, greenhopper, fisheye, sonar, hudson). I was also thinking perhaps a Subversion pre-commit hook, the Commit Acceptance Plugin for jira, or something equivalent.
想法?
推荐答案
Sonar(顺便说一句很棒的工具)与 构建破坏者 插件可以在某些指标不符合指定规则时破坏您的 Hudson 构建.您可以在 Sonar 中设置这样的规则,当覆盖率低于给定点时会触发警报(最终导致构建失败).唯一的缺点是您可能希望覆盖范围扩大,因此您必须记住每天将警报级别提高到当前值.
Sonar (wonderful tool by the way) with Build breaker plugin can break your Hudson build when some metrics don't meet specified rules. You can setup such a rule in Sonar that would trigger an alert (eventually causing the build to fail) when the coverage is below given point. The only drawback is that you probably want the coverage to grow, so you must remember to increase the alert level every day to the current value.
这篇关于确保对新 Subversion 提交的覆盖最小化的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:确保对新 Subversion 提交的覆盖最小化


- value & 是什么意思?0xff 在 Java 中做什么? 2022-01-01
- Safepoint+stats 日志,输出 JDK12 中没有 vmop 操作 2022-01-01
- Java包名称中单词分隔符的约定是什么? 2022-01-01
- 从 finally 块返回时 Java 的奇怪行为 2022-01-01
- 将log4j 1.2配置转换为log4j 2配置 2022-01-01
- 如何使用WebFilter实现授权头检查 2022-01-01
- Spring Boot连接到使用仲裁器运行的MongoDB副本集 2022-01-01
- Eclipse 插件更新错误日志在哪里? 2022-01-01
- Jersey REST 客户端:发布多部分数据 2022-01-01
- C++ 和 Java 进程之间的共享内存 2022-01-01