How to publish code-coverage results in Jenkins using an existing Jacoco coverage xml report?

345 views
Skip to first unread message

NeeBad

unread,
Jul 18, 2017, 3:43:54 PM7/18/17
to Jenkins JaCoCo plugin mailing list

Hello,

I am fairly new to the Jacoco coverage format, and was looking to integrate Jacoco coverage results with Jenkins using the Jenkins-Jacoco plugin.

I wanted to know if there's a way to publish code-coverage results from an existing XML report (well formed and valid according to the DTD in Jacoco documentation) in Jenkins? 

The change log in the documentation does mention that since version 1.0.3, the plugin works with .EXEC files instead of .XML files, but I was curious if there is still a way to integrate coverage results from a .XML file (maybe merge them with the .EXEC files) that would allow users to publish the results in Jenkins.


Thank you for any help on this.

Dominik Stadler

unread,
Jul 19, 2017, 4:36:10 PM7/19/17
to jenkins-jacoco-pl...@googlegroups.com
Hi,

the plugin is pretty tied to the .exec format, we discussed switching to the XML report at some point, but it was a large amount of work and I did not find all the information that the plugin uses in the XML. JaCoCo itself also does not provide functionality to read back in the information from the XML file, so it would probably be quite some work to enable this in the plugin.

Dominik.

--
Azért kapta ezt az üzenetet, mert feliratkozott a Google Csoportok „Jenkins JaCoCo plugin mailing list” csoportjára.
Az erről a csoportról és az ahhoz kapcsolódó e-mailekről való leiratkozáshoz küldjön egy e-amailt a(z) jenkins-jacoco-plugin-mailing-list+unsubscribe@googlegroups.com címre.
Ha üzenetet szeretne küldeni ebbe a csoportba, küldjön e-mailt a(z) jenkins-jacoco-plugin-mailing-li...@googlegroups.com címre.
További lehetőségekért látogasson el ide: https://groups.google.com/d/optout.

NeeBad

unread,
Jul 20, 2017, 10:34:39 AM7/20/17
to Jenkins JaCoCo plugin mailing list
Thank you for your response, Dominik.

Is the .exec file something that could I could write to, if I had the raw coverage data? 

Dominik Stadler

unread,
Jul 21, 2017, 2:37:34 AM7/21/17
to jenkins-jacoco-pl...@googlegroups.com
Hi,

Likely yes, but you will have to dig into jacoco itself to see how it does it and how you can reuse the code from there in your functionality.

Dominik.,

Reply all
Reply to author
Forward
0 new messages