Ant task to fail build if coverage less than threshold
Brought to you by:
vlad_r
Something along the lines of:
<taskdef name="check-coverage"
classname="net.sourceforge.emma.ant.CoverageCheckerTask"
classpath="...."/>
<check-coverage report="coverage.xml"
previousResults="old-coverage.xml"
classMinimum="70%"
methodMinimum="80%"
blockMinimum="90%"
lineMinimum="95%" />
Minima would be optional and assume defaults. Minima
are ANDed together.
Options to fail build if coverage declines from a
previous measurement would be nice but not a must-have.