[BUILD-75] Total coverage printed by clover plugin might be wrong in case cloverCoverageThreshold is set below the actual coverage Created: 23/Sep/11  Updated: 13/Apr/17  Resolved: 03/Nov/11

Status: Closed
Project: Build
Component/s: Build Tools
Affects Version/s: POMs 20
Fix Version/s: POMs 20

Type: Bug Priority: Neutral
Reporter: Daniel Lipp Assignee: Magnolia International
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
supersession
is superseded by BUILD-184 Clover: re-enable coverage of test cl... Closed
Template:
Acceptance criteria:
Empty
Date of First Response:

 Description   

After adding tests to magnolia-templating a total coverage of 71.3% was printed to console. When increasing the cloverCoverageThreshold to 70%, the build suddenly failed claiming a total coverage of 67.3% doesn't meet the threshold of 70%. When comparing with coverage reports on hudson

Here's a bunch of values gained when investigating a little further:

Module Threshold printed total actual coverage (from nexus-reports)
templating 65 71.3 67.3
templating 67 71.3 67.3
templating 68 67.3 67.3
templating 69 67.3 67.3
templating 79 67.3 67.3
core 45 48.6 47.3
core 48 47.3 47.3
core 49 47.3 47.3


 Comments   
Comment by Magnolia International [ 07/Oct/11 ]

The above is partly incorrect. To help better understand the issue, I've changed to order in which goals are executed. Now it goes :instrument, :log, :check - so :log is called every time.

There seems to be a mismatch between the log and the check goals of the Clover plugin and I've reported it as https://studio.plugins.atlassian.com/browse/CLMVN-144

At first, I thought this was related to multi-module builds, but it doesn't seem to be the case.

The problem doesn't show up on modules like dms or data. Perhaps because they have quite low coverage, or a smaller codebase. A test-build on the forum module (which is multi-module) also didn't show the problem (but again, smaller codebase...). In all cases, we still noticed a 0.1% difference between :log and :check printouts, so perhaps the issue is there as well, just not that blatant.

Comment by Magnolia International [ 03/Nov/11 ]

By ignore test sources in coverage, we get consistent results. See BUILD-76 for further progress.

Generated at Sun Feb 11 23:38:30 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.