I am working on code coverage on Gradle build..I tried locally it was working and generating all necessary files like .exec, .xml but when on Jenkins pipeline not generating any files...
Today I downloaded the Jenkins artifacts just to make sure that the reports folder present or not, and I found that it’s not. below is the dir structure…
for reference attaching all screen shots:
dir of Jenkins Artifacts..
Below Screenshot of running locally using the command "./gradlew clean jacocoTestReport sonarqube"
On 11. May 2021, at 17:16, Girish Bhat <gbh...@gmail.com> wrote:
Hi All,
I am working on code coverage on Gradle build..I tried locally it was working and generating all necessary files like .exec, .xml but when on Jenkins pipeline not generating any files...
Today I downloaded the Jenkins artifacts just to make sure that the reports folder present or not, and I found that it’s not. below is the dir structure…
for reference attaching all screen shots:
dir of Jenkins Artifacts..
<Screenshot 2021-05-11 at 6.18.21 PM.png>
Below Screenshot of running locally using the command "./gradlew clean jacocoTestReport sonarqube"
<Screenshot 2021-05-11 at 7.34.39 PM.png>
This is how the task is defined in app/build.gradle file
task jacocoTestReport(type: JacocoReport, dependsOn: [‘testProdReleaseUnitTest’]) {
reports {xml.enabled = truehtml.enabled = true}def fileFilter = ['**/R.class', '**/R$*.class', '**/BuildConfig.*', '**/Manifest*.*', 'android/**/*.*']def debugTree = fileTree(dir: "${buildDir}/intermediates/javac/prodRelease/classes", excludes: fileFilter)def mainSrc = "${project.projectDir}/src/main/java" getSourceDirectories().setFrom(files([mainSrc])) getClassDirectories().setFrom(files([debugTree])) getExecutionData().setFrom(fileTree(dir: "$buildDir", includes: ["jacoco/testProdReleaseUnitTest.exec"]))
}
--
You received this message because you are subscribed to the Google Groups "JaCoCo and EclEmma Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jacoco+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jacoco/e110719c-a6a9-40e5-bbf3-f6116a053152n%40googlegroups.com.
<Screenshot 2021-05-11 at 6.18.21 PM.png><Screenshot 2021-05-11 at 7.34.39 PM.png>
You received this message because you are subscribed to a topic in the Google Groups "JaCoCo and EclEmma Users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/jacoco/aj3n-p9ML5M/unsubscribe.
To unsubscribe from this group and all its topics, send an email to jacoco+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jacoco/F0AABA4F-1323-4C5F-80C9-18C2F255BD73%40mountainminds.com.
How is this gradle issue when l run locally it is generating all the .exec,.xml files.