We have a new mandate in our team that any new that is pushed to any of our GIT repositories need to have 100% code coverage. We already have (actively used and not legacy, deprecatable) code in the repository for which the coverage is around 75-80% (based on the repository).

We are generating sonar reports with jacoco being the underlying coverage analysis tool.

However, when we see the reports, we are not able to identify the coverage % for the new code alone. Is there a way to do that?

Please note that exclusion of modules or files is not always feasible since some of the code that is added is in an existing class.

Is there some setting that forces sonar/jacoco to provide this information?

有帮助吗?

解决方案

I don't know how your reports need to look like, but maybe the "differentials" help:

http://www.sonarqube.org/differentials-four-ways-to-see-whats-changed/

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top