Issues with integration into Gradle/Kotlin project


(Marcel Stör) #1

./gradlew sonarqube runs just fine.

Q1: I don’t really need JaCoCo, do I? Just relying on SonarQube is fine?
Q2: SonarQube shows the test coverage but not the number of tests and I don’t see the list of unit tests anywhere. Why could that be?
Q3: Besides test I made the sonarqube task also depend on my integrationTest task. Yet, the reported test coverage does not include the coverage from the latter. Is this intentional?

Code/configuration snippets

test {
    useJUnitPlatform {
        filter {
            includeTestsMatching "*Test*"
        }
    }
    failFast = true
...
task integrationTest(type: Test, group: "Verification", description: "Runs integration tests.") {
    mustRunAfter test
    classpath = configurations.integrationTestRuntime + sourceSets.main.output + sourceSets.test.output
    useJUnitPlatform {
        filter {
            includeTestsMatching "*IT"
        }
    }
}

project.tasks["sonarqube"].dependsOn "test", "integrationTest"