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

JaCoCo Coverage Statistics Grid Portlet reports 100% coverage in case there is no coverage collected at all

    XMLWordPrintable

Details

    • Bug
    • Status: Open (View Workflow)
    • Major
    • Resolution: Unresolved
    • jacoco-plugin
    • None
    • Ubuntu Server 14.04
      Java 1.8.0_101
      Jenkins 2.161
      JaCoCo Plugin 3.0.4
      Dashboard View 2.10

    Description

      JaCoCo Coverage Statistics Grid Portlet reports 100% coverage in case there is no coverage collected at all.

      Here is the coverage reported by the portlet

      ... and here is the coverage trend as it is shown when clicking and navigating to the corresponding item from the portlet

      Attachments

        Issue Links

          Activity

            szhem Sergey Zhemzhitsky created issue -
            szhem Sergey Zhemzhitsky made changes -
            Field Original Value New Value
            Description JaCoCo Coverage Statistics Grid Portlet reports 100% coverage in case there no coverage collected at all.

            Here is the coverage reported by the portlet

            !image-2019-02-13-16-31-29-943.png|width=600!

            ... and here is the coverage trend as it is shown when clicking and navigating to the corresponding item from the portlet

             !image-2019-02-13-16-34-36-731.png|width=600!
            JaCoCo Coverage Statistics Grid Portlet reports 100% coverage in case there are no coverage collected at all.

            Here is the coverage reported by the portlet

            !image-2019-02-13-16-31-29-943.png|width=600!

            ... and here is the coverage trend as it is shown when clicking and navigating to the corresponding item from the portlet

            !image-2019-02-13-16-34-36-731.png|width=600!
            szhem Sergey Zhemzhitsky made changes -
            Description JaCoCo Coverage Statistics Grid Portlet reports 100% coverage in case there are no coverage collected at all.

            Here is the coverage reported by the portlet

            !image-2019-02-13-16-31-29-943.png|width=600!

            ... and here is the coverage trend as it is shown when clicking and navigating to the corresponding item from the portlet

            !image-2019-02-13-16-34-36-731.png|width=600!
            JaCoCo Coverage Statistics Grid Portlet reports 100% coverage in case there are no coverage collected at all.

            Here is the coverage reported by the portlet

            !image-2019-02-13-16-31-29-943.png|width=600!

            ... and here is the coverage trend as it is shown when clicking and navigating to the corresponding item from the portlet

            !image-2019-02-13-16-34-36-731.png|width=500!
            szhem Sergey Zhemzhitsky made changes -
            Description JaCoCo Coverage Statistics Grid Portlet reports 100% coverage in case there are no coverage collected at all.

            Here is the coverage reported by the portlet

            !image-2019-02-13-16-31-29-943.png|width=600!

            ... and here is the coverage trend as it is shown when clicking and navigating to the corresponding item from the portlet

            !image-2019-02-13-16-34-36-731.png|width=500!
            JaCoCo Coverage Statistics Grid Portlet reports 100% coverage in case there are no coverage collected at all.

            Here is the coverage reported by the portlet

            !image-2019-02-13-16-31-29-943.png|width=600!

            ... and here is the coverage trend as it is shown when clicking and navigating to the corresponding item from the portlet

            !image-2019-02-13-16-34-36-731.png|width=400!
            szhem Sergey Zhemzhitsky made changes -
            Summary JaCoCo Coverage Statistics Grid Portlet reports 100% coverage in case there no coverage collected at all JaCoCo Coverage Statistics Grid Portlet reports 100% coverage in case there is no coverage collected at all
            szhem Sergey Zhemzhitsky made changes -
            Description JaCoCo Coverage Statistics Grid Portlet reports 100% coverage in case there are no coverage collected at all.

            Here is the coverage reported by the portlet

            !image-2019-02-13-16-31-29-943.png|width=600!

            ... and here is the coverage trend as it is shown when clicking and navigating to the corresponding item from the portlet

            !image-2019-02-13-16-34-36-731.png|width=400!
            JaCoCo Coverage Statistics Grid Portlet reports 100% coverage in case there is no coverage collected at all.

            Here is the coverage reported by the portlet

            !image-2019-02-13-16-31-29-943.png|width=600!

            ... and here is the coverage trend as it is shown when clicking and navigating to the corresponding item from the portlet

            !image-2019-02-13-16-34-36-731.png|width=400!
            centic centic added a comment -

            There are currently two cases that are hard to distinguish:

            a) There are no lines/branches to cover, e.g. a interface class without any statics and default methods, this should be shown as "100% covered" as there is nothing more that can be covered
            b) There are lines/branches to cover, but no coverage was reported at all for the class. In this case it should be shown as "0%" covered

            Unfortunately it seems both cases currently look exactly the same when the jacoco-plugin see coverage-results, at least I could not find a way to distinguish between those two cases.

            If anybody has an idea how this can be done technically, it should be possible to fix this, otherwise we would be playing change-ping-pong if we just change the current code to show 0% as then other cases are again reported incorrectly.

            Code-location for the actual computation is at hudson/plugins/jacoco/model/Coverage.java:80

            centic centic added a comment - There are currently two cases that are hard to distinguish: a) There are no lines/branches to cover, e.g. a interface class without any statics and default methods, this should be shown as "100% covered" as there is nothing more that can be covered b) There are lines/branches to cover, but no coverage was reported at all for the class. In this case it should be shown as "0%" covered Unfortunately it seems both cases currently look exactly the same when the jacoco-plugin see coverage-results, at least I could not find a way to distinguish between those two cases. If anybody has an idea how this can be done technically, it should be possible to fix this, otherwise we would be playing change-ping-pong if we just change the current code to show 0% as then other cases are again reported incorrectly. Code-location for the actual computation is at hudson/plugins/jacoco/model/Coverage.java:80
            centic centic added a comment -

            See JENKINS-25076 and JENKINS-29117 for previous issues about 100%/0% coverage.

            centic centic added a comment - See JENKINS-25076 and JENKINS-29117 for previous issues about 100%/0% coverage.
            centic centic made changes -
            Link This issue is related to JENKINS-29117 [ JENKINS-29117 ]
            centic centic made changes -
            Link This issue is related to JENKINS-25076 [ JENKINS-25076 ]
            tgr Tobias Gruetzmacher made changes -
            Component/s dashboard-view-plugin [ 15679 ]
            tgr Tobias Gruetzmacher made changes -
            Assignee Tobias Gruetzmacher [ tgr ] Ognjen Bubalo [ ognjenb ]

            The jacoco-plugin brings its own dashboard portlet, removing dashboard-view-plugin from components, because this must be fixed in the jacoco-plugin.

             

            tgr Tobias Gruetzmacher added a comment - The jacoco-plugin brings its own dashboard portlet, removing dashboard-view-plugin from components, because this must be fixed in the jacoco-plugin.  

            People

              ognjenb Ognjen Bubalo
              szhem Sergey Zhemzhitsky
              Votes:
              2 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated: