Easy distinct unit and integration test code coverage with sonarqube
Simple compute distinct code coverage for unit tests and integration tests. I used jacoco 0.7.2, sonarqube 5.0 and maven 3.2.5 to cook the numbers ;).
A simple call with maven to run the test suite and activate jacoco class instrumentation would be: Later on the usual sonarqube run:See also
- example configuration from sonar itself
- some blog entries on coverage in the sonar-blog
- jacoco maven-plugin
- older outdated config sample
- 2015-02-07, no need for extra failsafe config
- 2015-10-25, change phase for using the results, dont let failing integration tests miss your integration coverage