I use JaCoCo maven plugin. Can I specify finer-grained thresholds for certain classes (TOTALCOUNT, COVEREDCOUNT, MISSEDCOUNT, COVEREDRATIO, MISSEDRATIO etc)? Something like finer-grained thresholds for certain classes using regular expressions in cobertura.
https://github.com/cobertura/cobertura/wiki/Ant-Task-Reference
I've already tried to use <includes> in rule specification but it doesn't work.
For example:
<configuration>
<haltOnFailure>true</haltOnFailure>
<rules>
<rule element="PACKAGE">
<includes>
<include>com.package_name.SomeClass</include>
</includes>
<limits>
<limit counter="LINE" value="COVEREDRATIO"><minimum>0.90</minimum></limit>
</limits>
</rule>
</rules>
</configuration>
Thank you in advance!
It still doesn't work correctly. I created the simple test project and used "/" instead of "." as a package name separator. I also created the empty test class so coverage should be 0% and set threshold of line coverage to 0.90 (90%) in JaCoCo maven plugin configuration but haltOnFailure flag doesn't halt the build.
--
Thanks for sample - I'll take a look on it soon.
P.S. I've added group back into list of recipients - in future please post answers back into group instead of private emails.
--С уважением,Андрей Селькинandreyselkin@...