JaCoCo integration with SONAR for module coverage and integration

Has anyone tried to configure JaCoCo to reset the coverage of unit tests and integration in 2 different files so that SONAR uses them using ANT build?

+4
source share
1 answer

The following example shows how to integrate jacoco and sonar into the ANT construct:

The github sample site provides an example of using Java runner, both unit test and integration tests are integrated:

This option must be adapted. Suitable sonar properties:

#Tells SonarQube to reuse existing reports for unit tests execution and coverage reports
sonar.dynamicAnalysis=reuseReports

#Tells SonarQube where the unit tests execution reports are
sonar.junit.reportsPath=reports/junit

#Tells SonarQube that the code coverage tool by unit tests is JaCoCo
sonar.java.coveragePlugin=jacoco

#Tells SonarQube where the unit tests code coverage report is
sonar.jacoco.reportPath=reports/jacoco/jacoco-ut.exec

#Tells SonarQube where the integration tests code coverage report is
sonar.jacoco.itReportPath=reports/jacoco/jacoco-it.exec
+7
source

All Articles