Hello, I'm using the jacoco java agent to dump the coverage of my integration tests (via jmx call) to a file and then use it with jenkins' jacoco plugin to show the coverage trend column. The following command line is used: -javaagent:org.jacoco.agent-0.7.6.201602180812-runtime.jar=destfile=/tmp/var/itjacoco.exec,jmx=true,append=false
Since the application has several components (several jars in classpath), the exec file is copied to each component's work space and when the component is built, the coverage is collected by the jacoco plugin. As you can see below, the jacoco plugin collects 2 files: the one from IT tests and the one from unit tests. But only the coverage of the unit tests are shown. If I comment the unit tests, the coverage is zero. [JaCoCo plugin] Collecting JaCoCo coverage data... [JaCoCo plugin] **/**.exec;**/classes;**/src/main/java; locations are configured [JaCoCo plugin] Number of found exec files for pattern **/**.exec: 2 [JaCoCo plugin] Saving matched execfiles: /var/jenkins/fs/workspace/xxxx/itjacoco.exec /var/jenkins/fs/workspace/xxxx/target/jacoco.exec [JaCoCo plugin] Saving matched class directories for class-pattern: **/classes: /var/jenkins/fs/workspace/xxxx/target/classes [JaCoCo plugin] Saving matched source directories for source-pattern: **/src/main/java: /var/jenkins/fs/workspace/xxxx/src/main/java [JaCoCo plugin] Loading inclusions files.. [JaCoCo plugin] inclusions: [] [JaCoCo plugin] exclusions: [] [JaCoCo plugin] Thresholds: JacocoHealthReportThresholds [minClass=0, maxClass=0, minMethod=0, maxMethod=0, minLine=0, maxLine=0, minBranch=0, maxBranch=0, minInstruction=0, maxInstruction=0, minComplexity=0, maxComplexity=0] [JaCoCo plugin] Publishing the results.. [JaCoCo plugin] Loading packages.. [JaCoCo plugin] Done. [JaCoCo plugin] Overall coverage: class: 18, method: 18, line: 11, branch: 12, instruction: 11 Any idea what can be wrong? This was working last week when this job was running on windows. Now this job runs in a linux slave machine. Jacoco plugin used: 2.0.1 Thanks Regards Rui Rodrigues -- You received this message because you are subscribed to the Google Groups "Jenkins Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/4a54d3b9-96e3-4fa1-a8a6-fb3b113c9afb%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
