Discussion:
[java code coverage] The red/green coverage bar of Jacoco report isn’t shown correctly
minna hu
2014-01-14 00:06:00 UTC
Permalink
I use maven-antrun-plugin and org.jacoco.ant.ReportTask to parse multiple
execution data files, read source codes from multiple projects and then
generate a consolidated jacoco report.

But the jacoco report is not presented as expected, the red/green bar
showing code coverage is not consistent with the code coverage percentage.
I met several misleading situations, such as

1. Some package with instruction coverage < 100% is shown as all green
2. Some package don’t have a bar showing coverage
3. Some package with instruction coverage > 0% is shown as all red

Please check the report snapshot. For company security regulations, I took
off the package name from the report. Any idea how to make the red/green
coverage bar more accurate? Thank you~
<Loading Image...>
--
You received this message because you are subscribed to the Google Groups "JaCoCo and EclEmma Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jacoco+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/***@public.gmane.org
For more options, visit https://groups.google.com/groups/opt_out.
Marc R. Hoffmann
2014-01-14 06:25:11 UTC
Permalink
Hi,

somebody (you?) asked the same question before in the tracker:
https://github.com/jacoco/jacoco/issues/176

The answer was: The bars give a rough visual feedback about instruction
coverage.

1. If the percentage is nearly 100% you might not see a red part any more.
2. The lengths of the bars represent the total size of instructions in
this group. So e.g. a very small package in comparison to the other
packages will not show up at all.
3. See 1)

Best regards,
-marc
Post by minna hu
I use maven-antrun-plugin and org.jacoco.ant.ReportTask to parse
multiple execution data files, read source codes from multiple
projects and then generate a consolidated jacoco report.
But the jacoco report is not presented as expected, the red/green bar
showing code coverage is not consistent with the code coverage
percentage. I met several misleading situations, such as
1. Some package with instruction coverage < 100% is shown as all green
2. Some package don’t have a bar showing coverage
3. Some package with instruction coverage > 0% is shown as all red
Please check the report snapshot. For company security regulations, I
took off the package name from the report. Any idea how to make the
red/green coverage bar more accurate? Thank you~
--
You received this message because you are subscribed to the Google Groups "JaCoCo and EclEmma Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jacoco+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/***@public.gmane.org
For more options, visit https://groups.google.com/groups/opt_out.
Loading...