We are using sonarqube version 8.9 and jacoco-maven-plugin version 0.8.7.
We also use maven-sueerfire-plugin for unit tests and maven-failsafe-plugin for integration tests.
The reported coverage in sonarqube seems to be showing the combined coverage of both unit and integration tests. However in the left menu, I can only see Unit Tests, when I click on this link I can see the number of unit tests. Is it also possible to show the number of integration tests ? Why are they not all together so we can have a full overview of test classes ?
This is labeled Unit Tests because that’s typically what the reports about the tests themselves cover. There’s not a way to have a second set of numbers that’s just about your ITs.
Thank you for your answer, however when I look under unit tests, I only see the unit tests listed, not the integration tests. Maybee it’s a detail but just want to make sure the coverage is accurate.
I found a work around but it would be better to use the failsafe plugin.
The work around is to configure the surefire plugin to include **/*Test.java and **/*IT.java files and to use the build-helper-maven-plugin and to add src/it/java as test sources.