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

Data displayed in Jenkins, do not correspond exactly to the data in the file coverage.xml

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • cobertura-plugin
    • Cobertura jenkins plugin Version 1.6, on a Jenkins version 1.480

      We have detected that the data displayed in the report showing Jenkins, do not correspond exactly to the data in the file generated by Cobertura (coverage.xml).
      There are differences in both total number of lines of the project, the number of lines covered and also in number of classes.

      For example,

      The content of the file coverage.xml for a specific build is the next one:

      <coverage line-rate="0.21086464463558172" branch-rate="0.09980237154150198" lines-covered="2329" lines-valid="11045" branches-covered="303" branches-valid="3036" complexity="2.743722304283604" version="1.9.2" timestamp="1366727626987">

      But the report of coverage shown in the Jenkins project, indicates that there are a total of 11023 Java lines and a total of 153 Java classes.

      As you can see, the data is different

          [JENKINS-17749] Data displayed in Jenkins, do not correspond exactly to the data in the file coverage.xml

          Sergio Cuenca added a comment -

          Have you discover which the problem is?
          Thank you.

          Sergio Cuenca added a comment - Have you discover which the problem is? Thank you.

          Iván López added a comment -

          Have same issue with my tests. Jenkins appears to calculate the lines and percentages by its own, not reading the values in coverage.xml.

          In my case, the problem comes (I guess) because one file has no test at all, in coverage.xml they appear, and sums in totals, but jenkins doesn't take that file into account while calculating. If I write a little test using something in that file, everything is calculated correctly.

          Iván López added a comment - Have same issue with my tests. Jenkins appears to calculate the lines and percentages by its own, not reading the values in coverage.xml. In my case, the problem comes (I guess) because one file has no test at all, in coverage.xml they appear, and sums in totals, but jenkins doesn't take that file into account while calculating. If I write a little test using something in that file, everything is calculated correctly.

            sogabe sogabe
            scuencag Sergio Cuenca
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: