Using Java, JUnit 4, JaCoCo, Gradle and Sonarqube, I'm able to see code coverage in Sonarqube, however, I'm unable to see which tests cover lines of code (i.e. which tests contributed to the coverage).
It appears that using Maven there is a surefire
plugin that can be configured to enable this, however I'm unable to find an option for Gradle.
It's a multi-project gradle build, and each sub-project has the following section:
project(":<proj_name>") {
sonarqube {
properties {
property "sonar.jacoco.reportPaths", "$project.buildDir/jacoco/test.exec"
property "sonar.junit.reportsPath", "$project.buildDir/test-results/*.xml"
}
}
}
Is there something equivalent to the argLine
property for surefire
that I need to turn on? Is this even possible with a Gradle/JaCoCo/JUnit combo?