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

Coverage report includes classes that have been excluded from Jacoco analysis

    Details

    • Similar Issues:

      Description

      In my Maven config there are a number of classes that are excluded from Jacoco analysis. The report generated by Jacoco does not include these classes. The report generated by the Jenkins Jacoco plugin does includes these classes which gives a misleading picture and makes it difficult to set any coverage thresholds. I think this may be related to JENKINS-14975.

        Attachments

          Activity

          Hide
          jgangemi Jae Gangemi added a comment -

          i'm confused as to why this information just isn't part of the generated results file in the first place as a block that indicates what to exclude. perhaps even better would just be excluding the classes from the result file outright. disclaimer: i have not looked into how the maven plugin works when i choose to generate a report, but it does do the proper exclusions.

          if the plugin needs to parse the pom to figure this out, then that is the fix but that doesn't really seem like the correct solution here b/c what if i'm a nodejs project that is able to generate coverage reports in jacoco format? there's not going to be any pom to parse for exclusions in that case.

          Show
          jgangemi Jae Gangemi added a comment - i'm confused as to why this information just isn't part of the generated results file in the first place as a block that indicates what to exclude. perhaps even better would just be excluding the classes from the result file outright. disclaimer: i have not looked into how the maven plugin works when i choose to generate a report, but it does do the proper exclusions. if the plugin needs to parse the pom to figure this out, then that is the fix but that doesn't really seem like the correct solution here b/c what if i'm a nodejs project that is able to generate coverage reports in jacoco format? there's not going to be any pom to parse for exclusions in that case.
          Hide
          gstanek Gabriel Stanek added a comment -

          Alex Taylor , what you've described, regarding the exclude block in the maven plugin not taking affect in Jenkins, is the issue I've seen and am interested in a fix for, and seems to align with the initial description (which is specific to maven based projects).

          Show
          gstanek Gabriel Stanek added a comment - Alex Taylor , what you've described, regarding the exclude block in the maven plugin not taking affect in Jenkins, is the issue I've seen and am interested in a fix for, and seems to align with the initial description (which is specific to maven based projects).
          Hide
          ataylor Alex Taylor added a comment -

          Thanks for the update Gabriel Stanek just wanted make sure I was understanding everyone's issue and how best I can fix it

          Show
          ataylor Alex Taylor added a comment - Thanks for the update Gabriel Stanek just wanted make sure I was understanding everyone's issue and how best I can fix it
          Hide
          alan_czajkowski Alan Czajkowski added a comment -

          really looking forward to this fix! lots of anxiety around this bug

          Show
          alan_czajkowski Alan Czajkowski added a comment - really looking forward to this fix! lots of anxiety around this bug
          Hide
          rajiv_jandial Rajiv Jandial added a comment -

          I am still seeing this as an open issue. Even I exclude the package from the pom.xml as well as from the Jenkins "exclusions" fields, those packages are still being included in the JaCoCo report.

          Show
          rajiv_jandial Rajiv Jandial added a comment - I am still seeing this as an open issue. Even I exclude the package from the pom.xml as well as from the Jenkins "exclusions" fields, those packages are still being included in the JaCoCo report.

            People

            • Assignee:
              ognjenb Ognjen Bubalo
              Reporter:
              daknin Darrell King
            • Votes:
              19 Vote for this issue
              Watchers:
              25 Start watching this issue

              Dates

              • Created:
                Updated: