I am using the JACOCO tool in a Maven project. It creates an XML code file "jacoco.xml" . Since I'm going to parse this xml, I need to know the value of some attributes in the XML file. xml contains the following elements:
<sourcefile name="Ops.java"> <line nr="3" mi="0" ci="3" mb="0" cb="0"/> <line nr="5" mi="0" ci="4" mb="0" cb="0"/> <line nr="11" mi="0" ci="5" mb="2" cb="2"/> <line nr="12" mi="0" ci="2" mb="0" cb="0"/> <line nr="14" mi="8" ci="0" mb="0" cb="0"/> <line nr="15" mi="2" ci="0" mb="0" cb="0"/> <counter type="INSTRUCTION" missed="10" covered="14"/> <counter type="BRANCH" missed="2" covered="2"/> <counter type="LINE" missed="2" covered="4"/> <counter type="COMPLEXITY" missed="2" covered="3"/> <counter type="METHOD" missed="0" covered="3"/> <counter type="CLASS" missed="0" covered="1"/> </sourcefile>
the variable "nr" apparently means the line number. What are the values โโof the variables "mi", "ci", "mb" and "cb" ?
And here is the code coverage shown in the generated html output.

xml parsing code-coverage jacoco
Chathura wijeweera
source share