Jacoco Code Coverage Reports as CSV instead of HTML

34 views
Skip to first unread message

peter_...@web.de

unread,
Dec 13, 2017, 6:26:19 AM12/13/17
to JaCoCo and EclEmma Users
Hi,

we used the following fragment of ANT-script to generate JACOCO reports.

<target name="report" depends="unittest">
<!-- Step 3: Create coverage report -->
<jacoco:report>

<!-- This task needs the collected execution data and ... -->
<executiondata>
<file file="${result.exec.file}" />
</executiondata>

<!-- the class files and optional source files ... -->
<structure name="JaCoCo Ant Example">
<classfiles>
<fileset dir="${result.classes.dir}" />
</classfiles>
<sourcefiles encoding="UTF-8">
<fileset dir="${src.dir}" />
</sourcefiles>
</structure>

<!-- to produce reports in different formats. -->
<html destdir="${result.report.dir}" />
<csv destfile="${result.report.dir}/report.csv" />
<xml destfile="${result.report.dir}/report.xml" />
</jacoco:report>
</target>

For each Class a HTML-file is generated with the following information:

Element Missed Instructions Cov. Missed Branches Cov. Missed Cxty Missed Lines Missed Methods

For all classes a report is generated with the summary info of each class.

Is it possible to generate a CSV-file for each class with the information written in the HTML-files?
Or is it possible to generate the summary-info-report for each class with detailed infos about the methods in the classes and not only the summarized information.

Peter

Marc Hoffmann

unread,
Dec 13, 2017, 2:52:27 PM12/13/17
to jac...@googlegroups.com
Hi Peter,

CSV reports show total numbers on class level only. If you need a
machine readable format on method level please have a look at the JaCoCo
XML reports.

Regards,
-marc
Reply all
Reply to author
Forward
This conversation is locked
You cannot reply and perform actions on locked conversations.
0 new messages