Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changed rendering of percentgraph #29

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

simedw
Copy link

@simedw simedw commented Sep 11, 2013

The bars indicating code coverage were a tad confusing so I changed them:

  • All bars are always 100px wide.
  • Starts with green, then red.
  • Percentage of the red bar is calculated as
missed / (covered + missed)

* Always 100px wide.
* Starts with green, then red
@buildhive
Copy link

Jenkins » jacoco-plugin #98 SUCCESS
This pull request looks good
(what's this?)

@jenkinsadmin
Copy link
Member

Thank you for a pull request! Please check this document for how the Jenkins project handles pull requests

@mabako
Copy link
Member

mabako commented Sep 16, 2013

Similar to how JaCoCo's HTML generator handles the size of the bars, these shouldn't be 100px each - the more code a package has (as in, lines, methods, etc.) the longer the bar should be.

Likewise JaCoCo has red first, then green.

Your statement abotu the percentage of the red bar is absolutely valid and should be changed.

@simedw
Copy link
Author

simedw commented Sep 16, 2013

I definitely see why it would be good to keep the behavior similar to the main HTML generator of Jacoco...

But after introducing Jacoco at work almost everyone complained that the bars were more or less unusable since sometimes there were too small to actually be rendered and many found them unintuitive.

Would it be okay if I made this into an optional setting? 


Sent from Mailbox for iPhone

On Mon, Sep 16, 2013 at 5:37 AM, mabako notifications@github.com wrote:

Similar to how JaCoCo's HTML generator handles the size of the bars, these shouldn't be 100px each - the more code a package has (as in, lines, methods, etc.) the longer the bar should be.

Likewise JaCoCo has red first, then green.

Reply to this email directly or view it on GitHub:
#29 (comment)

@mabako
Copy link
Member

mabako commented Sep 16, 2013

I believe so - though @ognjenb would know better as he's the plugin maintainer.

@ognjenb
Copy link
Contributor

ognjenb commented Sep 16, 2013

Of course, an optional setting would be good. Do you want to change on the pull request, or I should check the existing?

@ognjenb
Copy link
Contributor

ognjenb commented Jan 1, 2014

@simedw Do you have time maybe to work on this optional feature?

@avix
Copy link

avix commented Jul 19, 2014

The coverage bars show percentages. So there's absolutely no need to let their width vary.

There are even cases where the varying width renders the coverage report completely useless, as can be seen here: https://issues.jenkins-ci.org/browse/JENKINS-23588

@centic9 centic9 changed the title Changed rending of precentgraph Changed rendering of percentgraph Nov 24, 2014
@veita
Copy link
Contributor

veita commented Apr 25, 2017

Waiting for a fix for some years now. Hope we will see useful Jacoco coverage reports some day.

https://issues.jenkins-ci.org/browse/JENKINS-23588

@mheinzerling
Copy link
Collaborator

@veita From what I read here, there is not even a clear understanding how the report should look like. So without a spec we all agree on we will not see any progress here. (Beside the fact that we need somebody who is willing to implement it. Maybe you?)

@endertunc
Copy link

endertunc commented Oct 8, 2020

Just use https://plugins.jenkins.io/code-coverage-api/ which support jacoco out of the box then you will have graph that looks like this:

summary-chart

See more details at https://www.jenkins.io/blog/2018/08/17/code-coverage-api-plugin-1/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
9 participants