Export Session to XML >> EclEmma Plugin

74 views
Skip to first unread message

harald...@gmail.com

unread,
Mar 5, 2015, 1:40:10 PM3/5/15
to jac...@googlegroups.com
Hi at all!

I exported a coverage report of EclEmma to an XML file.
When I open the xml file the whole content of the xml file is showed in one row. There are no line breaks, this make it very hard to read the XML file.

Is there a possibility to change this behavior?


Thanks and best,
Harald

Marc R. Hoffmann

unread,
Mar 5, 2015, 1:46:10 PM3/5/15
to jac...@googlegroups.com
Hallo Harald,

by desing we avoid "pretty formatting" as this would cause a serious
increase in size and also increase generation and parsing time. The XML
report is not meant to be read by humans anyways.

For manual inspection I recommend using a XML editor/viewer which allows
showing the structure or reformatting the file.

There is no option to enable pretty formatting.

Regards,
-marc

harald...@gmail.com

unread,
Mar 5, 2015, 2:01:44 PM3/5/15
to jac...@googlegroups.com, harald...@gmail.com
Hi Marc,

thank you for your fast response!
I understand the issue and will use a XML editor for manual inspection of the xml file.

I have another question:

The EclEmma Plugin provide me in Eclipse with a coverage percentage (e.g. 82.1%). When I inspect the exported xml file I cannot find this percentage value.
For example I have a class with 39 instructions. 32 of them are covered and therefore 7 missed. I only can find the value 32 and 7, but not the total number of instructions (39) nor the calculated percentage in the xml.

Shoud I calculate the coverage percentage on my own or did I make a mistake an these values should be included in the xml file?

Thanks and best regards,
Harald

Marc R. Hoffmann

unread,
Mar 5, 2015, 2:07:24 PM3/5/15
to jac...@googlegroups.com
Hi,

again for efficiency the XML file only contains covered and missed item
counters. Totals and percentage can be easily calculated:

total = covered + missed
coverage = covered / total

See DTD for documentation of the XML format:

http://www.eclemma.org/jacoco/trunk/coverage/report.dtd

Regards,
-marc

harald...@gmail.com

unread,
Mar 5, 2015, 2:16:35 PM3/5/15
to jac...@googlegroups.com
Hi Marc,

thank you for your answer and the DTD! Now everything is clear :)

Best regards from Austria,

Harald


On Thursday, March 5, 2015 at 8:07:24 PM UTC+1, Marc R. Hoffmann wrote:
> Hi,
>
> again for efficiency the XML file only contains covered and missed item
> counters. Totals and percentage can be easily calculated:
>
> total = covered + missed
> coverage = covered / total
>
> See DTD for documentation of the XML format:
>
> http://www.eclemma.org/jacoco/trunk/coverage/report.dtd
>
> Regards,
> -marc
>
Reply all
Reply to author
Forward
This conversation is locked
You cannot reply and perform actions on locked conversations.
0 new messages