Generate jacaco code coverage as xml

24 views
Skip to first unread message

Surya Chandrakumar

unread,
Aug 5, 2020, 1:24:26 AM8/5/20
to JaCoCo and EclEmma Users
Hi Team,

I am using jacoco with maven and using it in jenkins. The code coverage is generating only in binary format, i.e. with.exec file. But I want the report should be generate in XML format. Please kindly help me how to define it to generate code coverage report in xml format.

Marc Hoffmann

unread,
Aug 5, 2020, 2:52:56 AM8/5/20
to jac...@googlegroups.com
Hi Surya,

with the report goal you can create a XML report from the exec file. See documentation: https://www.jacoco.org/jacoco/trunk/doc/maven.html

Regards,
-marc


On 5. Aug 2020, at 07:24, Surya Chandrakumar <suryachan...@gmail.com> wrote:

Hi Team,

I am using jacoco with maven and using it in jenkins. The code coverage is generating only in binary format, i.e. with.exec file. But I want the report should be generate in XML format. Please kindly help me how to define it to generate code coverage report in xml format.

--
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/7727ccce-4477-4caf-a633-bbb43a6c7876o%40googlegroups.com.

Surya Chandrakumar

unread,
Aug 5, 2020, 7:23:42 AM8/5/20
to jac...@googlegroups.com
Thank You Marc,

But No luck, I defined the same as they mentioned but reports are not generating in XML format. I am running test cases with JUNIT5, will the configuration is same for JUNIT5 also.
Regards,
Surya

Marc Hoffmann

unread,
Aug 6, 2020, 3:15:02 AM8/6/20
to jac...@googlegroups.com
Hi Surya,

please find a working example here which also ships with the JaCoCo Download.

If you think there is a problem please provide a complete executable reproducer (Github repo) so we can have a look at it.

Regards,
-marc


Reply all
Reply to author
Forward
0 new messages