I am using the scoverage in Scala project. During the build, I generate coverage HTML and XML reports.
I need to parse the XML file (i.e. scoverage.xml
) to extract metrics for each class on:
* lines coverage: number of covered ones vs total
* statements coverage: number of covered ones vs total
* branches coverage: number of covered ones vs total
* functions coverage: number of covered ones vs total
Looking at the scoverage repo, I see that the report is generated by ScoverageXmlWriter.scala but it is not documented!!
So here is an example output of the statement tag
:
<statement package="<package>" class="<class>" class-type="Object" full-class-name="<package>.<class>" source="/path/to/<package>/<class>.scala" method="compileScala" start="350" end="350" line="18" branch="false" invocation-count="1" ignored="false">
</statement>
What does the attribute means?
Is line
corresponding to the line number in the file? and what's start
and end
stands for?