Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-15404

Failure when setting up metric goals in cobertura plugin

      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).

          [JENKINS-15404] Failure when setting up metric goals in cobertura plugin

          Still a problem in Jenkins 1.514/Cobertura Plugin 1.9. Would love to see this fixed.

          Mikael Uvebrandt added a comment - Still a problem in Jenkins 1.514/Cobertura Plugin 1.9. Would love to see this fixed.

          Can confirm still issue in Jenkins 1.580.2, With plugin version 1.9.6.

          My Report:
          classes: 100%, conditionals: 89%, flies: 100%, Lines: 76%, packages: 100%

          Also tried:
          -Setting bad = 50 causes the same thing to happen even tho lines are above the threshold.

          Joshua Gudmundson added a comment - Can confirm still issue in Jenkins 1.580.2, With plugin version 1.9.6. My Report: classes: 100%, conditionals: 89%, flies: 100%, Lines: 76%, packages: 100% Also tried: -Setting bad = 50 causes the same thing to happen even tho lines are above the threshold.

          Last two releases (separated by over a year) were by olivergondza so looks like the maintainer

          Stephen Connolly added a comment - Last two releases (separated by over a year) were by olivergondza so looks like the maintainer

            Unassigned Unassigned
            thrichard Thomas Richard
            Votes:
            2 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated: