The cobertura plugin allows 3 metrics goals to be set up:
- healthy (report health as 100% when coverage is higher than)
- bad (report health as 0% when coverage is less than)
- unstable (mark the build as unstable when coverage is less than)
Problem:
But the cobertura plugins marks the health at 0% when the achieved coverage is lower than "healthy" but bigger than "bad".
Example:
My project is setting up the "conditionals" goals only. The goals are: healthy 70, bad 20, unstable 0.
The current build has the coverage:
classes: 100%, conditionals: 68%, files: 100%, lines: 72%, packages 100%
Health is reported as 0%, describing "cobertura coverage: 68% (1155/1702) conditionals 0%".
Other tests:
I also tried with line coverage, with the same behaviour (so it doesn't look like it's a bug specific to the conditionals).
I tried to inverse "healthy" and "bad" (i.e healther=20 and bad=80) and the result was health=100% (as expected it's only checking the 1st).
|