Setting the coverage threshold using Emma and Ant

I use Emma in my ant build to generate coverage reports. For those who have used Emma, ​​is there a way to build an assembly if the line coverage (or any type of coating) does not meet a specific threshold? for example, if the line coverage is not 100%

+3
source share
2 answers

Not out of the box.

However, a property report.metricsor attribute <report></report>can be set for name, class, method, blockand line. See Coverage Metrics in Emma Help.

Use a text report, then a regular expression filter, to configure the failure condition.

+2
source

I wrote an ant task for this.

You can find all the necessary information on my EmmaCheck website .

+1
source

All Articles