简体   繁体   English

如何衡量每个开发人员的Java代码单元测试覆盖率?

[英]How to measure Java code unit test coverage per developer?

Scenario: a team works on a Java/Maven/JUnit project using some kind of SCM. 场景:团队使用某种SCM处理Java / Maven / JUnit项目。 We would like to increase test coverage, meaning all developers should test code more intensively. 我们希望增加测试覆盖率,这意味着所有开发人员都应该更加密集地测试代码。 Measuring overall test coverage improvements using something like SonarQube is easy enough, but you need to do it per developer in order to be able to recognise the outliers: engineers which have the best test coverage and engineers whose coverage is worst. 使用像SonarQube这样的东西测量整体测试覆盖率的改进很容易,但是你需要为每个开发人员做这件事,以便能够识别异常值:具有最佳测试覆盖率的工程师和覆盖率最差的工程师。

How would you answer the question "what is the test coverage of code modified by developer X during the last month?" 您如何回答“上个月开发者X修改的代码的测试覆盖率是多少?” Is there a surrogate, approximate measure that could be followed more easily? 是否有可以更容易遵循的替代,近似措施?

有一个商业开发人员Cockpit插件,可以做到这一点,以及其他漂亮的功能。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM