In Intellij, I have integrated jacoco, so that I can generate the jacoco Reort and put that on SonarQube to check code coverage. However, when I execute using command ./gradlew jacocoTestReport ,BUILD is SUCCESSFULLt but Task: jacocoTestReport SKIPPED. No .xm/.html report is generated. I tried various combination given on Google. I am using Junit5 and Spring Boot 2.6.2.
I checked the other threads but none of the solution worked for me.
Here is the gradle task script:
test {
useTestNG()
useJUnitPlatform()
finalizedBy jacocoTestReport
reports {
junitXml.required = true
html.required = false
}
}
jacocoTestReport {
dependsOn test
reports {
xml.enabled true
csv.enabled false
xml.destination file("${buildDir}/build/jacoco.xml")
}
}