Trend chars contains only 'line covered' and 'line missed'

1,085 views
Skip to first unread message

Вова Мигуро

unread,
Mar 5, 2013, 6:38:16 AM3/5/13
to jenkins-jacoco-pl...@googlegroups.com
Hi Guys,

In a DZone article I've seen that plugin can show varios stats: http://java.dzone.com/articles/jacoco-jenkins-plugin.

But for me only 'line covered' and 'line missed' shown. If generating reports locally with gradle - everything is fine.

Env:
Jenkins: 1.491
PluginVersion: 1.0.12
gradle-jacoco





Вова Мигуро

unread,
Mar 5, 2013, 8:57:32 AM3/5/13
to jenkins-jacoco-pl...@googlegroups.com
Ok, got it.

https://github.com/jenkinsci/jacoco-plugin/blob/master/src/main/java/hudson/plugins/jacoco/model/CoverageObject.java#L431

Others are commented. Not sure why they did it, but we have to wait for an update.

-vova

Mickael Istria

unread,
Mar 5, 2013, 9:01:58 AM3/5/13
to jenkins-jacoco-pl...@googlegroups.com
Do you mean that you are missing the percentage-based coverage reports?

If yes, I think that's totally intentional since quantitative analysis of code coverage based on percentage is not a good way to use coverage. Coverage is way more interesting when it tells you what is missing coverage, it's a very powerful tool when using qualitative analysis (answering the question "are these lines covered?").
So the percentage may have been removed by purpose to encourage people to stop just trying to get a "high score" but instead wonder about "what pieces of code are not safe".

HTH
--
Mickael Istria
Eclipse developer at JBoss, by Red Hat
My blog - My Tweets

Вова Мигуро

unread,
Mar 5, 2013, 11:12:26 AM3/5/13
to jenkins-jacoco-pl...@googlegroups.com
Mikael, 

What is the difference between:
- get this thing to 100%
- get this thing to 0

The only - how people perceive it. At the same time this thing brings some confusion right now. 
What is this lines? To have both of them at one chart is totally useless. If one goes up, second goes down. Why not to leave only 'linesMissed' ?
And because of different axes we can't put 'classMissed', 'complexityMissed', 'instructionMissed', 'methodsMissed' to it. 
Why not to use percentage, but in reversed order?

My question was different. Why I get only 2 lines on a chart instead of 6. So now I see what's going on.
-vova

Marc Hoffmann

unread,
Mar 5, 2013, 11:50:15 AM3/5/13
to jenkins-jacoco-pl...@googlegroups.com
Hi,

I introduced this point of view with the native JaCoCo reports. The
benefit comes if you compare projects (packages etc): What does it tell
you if A has 80% code coverage and B has 60%? B is "better"? No way, for
two reasons:

1) Just because you have code coverage it does not mean the code is
correct. So all it says is that A has 20% uncovered code and B has 40%
uncovered code.

2) How do you compare this figures if A has a total of 10'000 LOC and B
100 LOC? This means A has 2'000 lines if untested code while B only has
40 untested lines. So even if A has a way better coverage percentage it
is definitely the project to start testing with.

Best regards,
-marc
>> Eclipse developer at JBoss, by Red Hat [1]
>> My blog [2] - My Tweets [3]
>
> --
> Azért kapta ezt az üzenetet, mert feliratkozott a Google Csoportok
> szolgáltatásbeli Jenkins JaCoCo plugin mailing list csoportra.
> Az erről a csoportról és az ahhoz kapcsolódó e-mailekről való
> leiratkozáshoz küldjön egy levelet a következő címre:
> jenkins-jacoco-plugin-m...@googlegroups.com.
> Ha üzenetet szeretne küldeni ebbe a csoportba, küldjön egy
> e-mailt a(z) jenkins-jacoco-pl...@googlegroups.com
> címre.
> További lehetőségekért látogasson el a(z)
> https://groups.google.com/groups/opt_out [4] címre.
>
>
>
> Links:
> ------
> [1] http://www.jboss.org/tools
> [2] http://mickaelistria.wordpress.com
> [3] http://twitter.com/mickaelistria
> [4] https://groups.google.com/groups/opt_out

Uladzimir Mihura

unread,
Mar 6, 2013, 3:54:40 PM3/6/13
to jenkins-jacoco-pl...@googlegroups.com
Sorry, but I can't say that I agree with you here.

To solve the problem you've described, just replace percentage on bars with 'covered/all' or 'uncovered/all' and that's all.
You will understand where you need to apply your testing skills and things will be familiar for everyone.

And I think that it's better to use the same size for all bars. Trying to compare them visually just make things messy.

-vova
> Azért kapta ezt az üzenetet, mert feliratkozott a Google Csoportok keretében működő Jenkins JaCoCo plugin mailing list csoportra.
> A témáról való leiratkozáshoz látogasson el a következő címre: https://groups.google.com/d/topic/jenkins-jacoco-plugin-mailing-list/9pJCQpjEOck/unsubscribe?hl=hu. Az erről a csoportról és minden témájáról való leiratkozáshoz küldjön egy levelet a következő címre: jenkins-jacoco-plugin-m...@googlegroups.com.
> Ha üzenetet szeretne küldeni ebbe a csoportba, küldjön egy e-mailt a(z) jenkins-jacoco-pl...@googlegroups.com címre.
> További lehetőségekért látogasson el a(z) https://groups.google.com/groups/opt_out címre.
>
>

Marcell

unread,
Mar 7, 2013, 3:01:27 PM3/7/13
to jenkins-jacoco-pl...@googlegroups.com
Hi Boba,

totally agree with you.   I would also like to have the others lines  (class,complexity,...) back. 

Cheers,

Marcel


>> jenkins-jacoco-plugin-mailing-list+unsubscribe@googlegroups.com.
>> Ha üzenetet szeretne küldeni ebbe a csoportba, küldjön egy
>> e-mailt a(z) jenkins-jacoco-plugin-mailing-li...@googlegroups.com
>> címre.
>> További lehetőségekért látogasson el a(z)
>> https://groups.google.com/groups/opt_out [4] címre.
>>
>>
>>
>> Links:
>> ------
>> [1] http://www.jboss.org/tools
>> [2] http://mickaelistria.wordpress.com
>> [3] http://twitter.com/mickaelistria
>> [4] https://groups.google.com/groups/opt_out
>
> --
> Azért kapta ezt az üzenetet, mert feliratkozott a Google Csoportok keretében működő Jenkins JaCoCo plugin mailing list csoportra.
> A témáról való leiratkozáshoz látogasson el a következő címre: https://groups.google.com/d/topic/jenkins-jacoco-plugin-mailing-list/9pJCQpjEOck/unsubscribe?hl=hu. Az erről a csoportról és minden témájáról való leiratkozáshoz küldjön egy levelet a következő címre: jenkins-jacoco-plugin-mailing-list+unsubscribe@googlegroups.com.
> Ha üzenetet szeretne küldeni ebbe a csoportba, küldjön egy e-mailt a(z) jenkins-jacoco-plugin-mailing-li...@googlegroups.com címre.

Ognjen Bubalo

unread,
Mar 26, 2013, 7:45:14 PM3/26/13
to jenkins-jacoco-pl...@googlegroups.com
Hi,

In my opinion JaCoCo Jenkins plugin has to follow JaCoCo's own reporting style. If it would be different it would confuse others + the existing style tells much more information than a percentage bar as Marc said.

Br,
Ogi

Az erről a csoportról és az ahhoz kapcsolódó e-mailekről való leiratkozáshoz küldjön egy levelet a következő címre: jenkins-jacoco-plugin-m...@googlegroups.com.
Ha üzenetet szeretne küldeni ebbe a csoportba, küldjön egy e-mailt a(z) jenkins-jacoco-pl...@googlegroups.com címre.

sreedevi...@gmail.com

unread,
Jul 23, 2013, 12:15:54 PM7/23/13
to jenkins-jacoco-pl...@googlegroups.com
Hi
 
Is is going to be addressed or is there a path available to show all   coverages in a graph(for multi module too).
 
when we click the coverage , it gives us te detailed report and also the summary. it would be good to see the summary numbers in coverage trend graph..
 
 
thanks
Sree

Dominik Stadler

unread,
Jul 23, 2013, 5:17:30 PM7/23/13
to jenkins-jacoco-pl...@googlegroups.com
Hi,

It seems this functionality was removed on purpose some time back, see the commit at https://github.com/jenkinsci/jacoco-plugin/commit/ab3f301b4c269dd12e80fcecae73be2ddbdccbca

Dominik.

sreedevi...@gmail.com

unread,
Jul 24, 2013, 8:41:41 AM7/24/13
to jenkins-jacoco-pl...@googlegroups.com
thanks Dominik!! i would have loved to see the coverages of all in graph.. Let's see where it goes.
have you seen any discrepancy in multi module projects Jenkins reports? Like the %s gets messed up for a child module.
 
when i check workspace\target\site, it shows correct Numbers. which is not the same in the report that Jenkins has. this is only with multi module one

Christoph Kutzinski

unread,
Aug 27, 2013, 7:57:00 AM8/27/13
to jenkins-jacoco-pl...@googlegroups.com
I also like to see the other graphs.
I've seen that there is an issue already for this: https://issues.jenkins-ci.org/browse/JENKINS-16580

Go ahead and vote for it, if like to see it fixed, too :)
Reply all
Reply to author
Forward
0 new messages