[JIRA] (JENKINS-56123) JaCoCo Coverage Statistics Grid Portlet reports 100% coverage in case there is no coverage collected at all

9 views
Skip to first unread message

szhemzhitski@gmail.com (JIRA)

unread,
Feb 13, 2019, 12:47:03 PM2/13/19
to jenkinsc...@googlegroups.com
Sergey Zhemzhitsky updated an issue
 
Jenkins / Bug JENKINS-56123
JaCoCo Coverage Statistics Grid Portlet reports 100% coverage in case there is no coverage collected at all
Change By: Sergey Zhemzhitsky
Summary: JaCoCo Coverage Statistics Grid Portlet reports 100% coverage in case there is no coverage collected at all
Add Comment Add Comment
 
This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d)

szhemzhitski@gmail.com (JIRA)

unread,
Feb 13, 2019, 12:47:03 PM2/13/19
to jenkinsc...@googlegroups.com
Sergey Zhemzhitsky updated an issue
JaCoCo Coverage Statistics Grid Portlet reports 100% coverage in case there are 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!

dominik.stadler@gmx.at (JIRA)

unread,
Sep 28, 2019, 2:42:03 AM9/28/19
to jenkinsc...@googlegroups.com
centic commented on Bug JENKINS-56123
 
Re: JaCoCo Coverage Statistics Grid Portlet reports 100% coverage in case there is no coverage collected at all

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

This message was sent by Atlassian Jira (v7.13.6#713006-sha1:cc4451f)
Atlassian logo

dominik.stadler@gmx.at (JIRA)

unread,
Sep 28, 2019, 2:44:03 AM9/28/19
to jenkinsc...@googlegroups.com

tobias-jenkins@23.gs (JIRA)

unread,
Feb 2, 2020, 2:12:03 PM2/2/20
to jenkinsc...@googlegroups.com

tobias-jenkins@23.gs (JIRA)

unread,
Feb 2, 2020, 2:12:03 PM2/2/20
to jenkinsc...@googlegroups.com

tobias-jenkins@23.gs (JIRA)

unread,
Feb 2, 2020, 2:15:03 PM2/2/20
to jenkinsc...@googlegroups.com
Tobias Gruetzmacher commented on Bug JENKINS-56123
 
Re: JaCoCo Coverage Statistics Grid Portlet reports 100% coverage in case there is no coverage collected at all

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

 

Reply all
Reply to author
Forward
0 new messages