I'm having trouble getting IT test data to get published in Sonar, hoping someone has been through this!
I have a maven build that uses jacoco to publish UT coverage data (in target/jacaco.exec ) to Sonar and reports coverage - this works, resulting a X% coverage. The build also runs IT and generates IT coverage data (in target/jacaco-it.exec), but this doesn't seem to affect the baseline UT data that is uploaded and shown, log excerpt:
[INFO] Sensor SurefireSensor [java] (done) | time=111ms
[INFO] Sensor JaCoCoSensor [java]
[INFO] Analysing /home/andy/workspace/project/target/jacoco.exec
[INFO] Analysing /home/andy/workspace/project/target/jacoco-it.exec
[INFO] Analysing /home/andy/workspace/project/jemh-ui/target/sonar/jacoco-merged.exec
[INFO] No information about coverage per test.
...
The Sonar Project's JaCoCo settings are the defaults 'target/jacoco.exec, target/jacoco-it.exec'.
Build properties:
<sonar.java.coveragePlugin>jacoco</sonar.java.coveragePlugin>
<sonar.dynamicAnalysis>reuseReports</sonar.dynamicAnalysis>
<sonar.scm.provider>hg</sonar.scm.provider>
Build plugins:
<plugin>
<groupId>org.sonarsource.scanner.maven</groupId>
<artifactId>sonar-maven-plugin</artifactId>
<version>5.1</version>
</plugin>
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>0.7.9</version>
</plugin>
Cmd to build /deploy:
mvn clean org.jacoco:jacoco-maven-plugin:prepare-agent install
mvn sonar:sonar
Is there a way to diagnose the publication of IT data to sonar, to understand why the IT component is not seeming resulting in an update of coverage in Sonar?
Any insight on this appreciated!
Andy