Hi,

you can easily retrieve the total coverage figures e.g. with xpath from the report xml file. The top level node contains the total figures:

  <counter type="INSTRUCTION" missed="594" covered="18368"/>
  <counter type="BRANCH" missed="50" covered="1266"/>
  <counter type="LINE" missed="154" covered="4373"/>
  <counter type="COMPLEXITY" missed="105" covered="1778"/>
  <counter type="METHOD" missed="57" covered="1109"/>
  <counter type="CLASS" missed="7" covered="199"/>

Coverage percentage can be easily calculated:

  covered / (missed + covered)

Cheers,
-marc

On 2013-12-18 10:14, [email protected] wrote:
Morning,

Im in need of a way to compare 2 different coverage reports on the
unit test coverage aspect. The task is to fail a jenkins job if unit
test coverage in 1 report is lower than in the other. Im not using any
jenkins-jacoco plugins only jacoco and sonar. Currenctly im stuck on
the idea of how to get an overall coverage from a exec/csv/html or xml
in the way that it can be auto compared with the other one. Fresh
ideas are welcome.

--
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 [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to