I have a project, for which I have already have generated jacoco.exec report files using jacoco plugin for junit test case and integration test.
This is the maven properties I use for sonar:
<sonar.jacoco.itReportPath>${project.basedir}/target/it/jacoco.exec</sonar.jacoco.itReportPath>
<sonar.jacoco.reportPath>${project.basedir}/target/junit/jacoco.exec</sonar.jacoco.reportPath>
<!-- Tells Sonar to run the unit tests -->
<sonar.dynamicAnalysis>reuseReports</sonar.dynamicAnalysis>
<!-- Tells Sonar to use JaCoCo as the code coverage tool -->
<sonar.java.coveragePlugin>jacoco</sonar.java.coveragePlugin>
<sonar.language>java</sonar.language>
I created profile for sonar like below:
<profile>
<id>sonar-run</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<properties>
<sonar.jdbc.url>
jdbc:mysql://localhost:3306/sonar
</sonar.jdbc.url>
<sonar.jdbc.username>sonar</sonar.jdbc.username>
<sonar.jdbc.password>123qwe</sonar.jdbc.password>
<sonar.host.url>
http://localhost:9000/
</sonar.host.url>
</properties>
</profile>
The problem I face is, I am able to see the unit test code-coverage in sonar, but I am not able to see the integration-test code-coverage.
I run the maven command many ways some thing like this:
mvn verify -P sonar-run sonar:sonar
mvn verify -P sonar-run sonar:sonar -Dtests=false
mvn clean install -P sonar-run sonar:sonar
but still I am not able to see the integration-test code coverage in sonar, am I missing some step?
I use sonar 4.0, java-7.
Note: For us the jacoco.exec files are already generated in some other run, I just want to seed them to sonar if possible, this way we will gain some performance improvement.