ECLemma shows 0.0% of coverage when importing a exec file

155 views
Skip to first unread message

Wei Zhou

unread,
Oct 1, 2015, 1:47:33 PM10/1/15
to JaCoCo and EclEmma Users

I have a multi-module project, the application is running on an application server instrumented with a Jacocoagent, integration test are run against the application, and a code coverage exec file has been dumped.

I am using EclEmma plugin 2.3.2 in Eclipse Kepler to generate the code coverage, I opened the Coverage view, clicked the "Import session", selected the dumped exec file as the data file, and selected all the project source files.

The Generated coverage reports shows all the packages have 0.0% coverage. When I open the exec file itself, it shows the number of total probes, and the executed probes. For example, for class x.y.z the total probes is 30, and the executed probes is 16, but the coverage for the same class is shown as 0.0%. Why the coverage is 0.0%? since the executed probes is 16, it should have some coverages, instead of 0, right?


Marc Hoffmann

unread,
Oct 2, 2015, 4:12:28 AM10/2/15
to jac...@googlegroups.com
Hi,

how do you compile the classes for your deployed server application?
Note that class files at runtime and analysis time have to be the same.
If you build your app with JDK compiler and then import to Eclipse
(Eclipse compiler) coverage cannot be calculated. See background info
here: http://eclemma.org/jacoco/trunk/doc/classids.html

Regards,
-marc

On 2015-10-01 19:47, Wei Zhou wrote:
> 0 down vote favorite [1]
> --
> 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+un...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/jacoco/deea3153-b878-49d4-97be-cbf21c658c35%40googlegroups.com
> [2].
> For more options, visit https://groups.google.com/d/optout [3].
>
>
> Links:
> ------
> [1]
> http://stackoverflow.com/questions/32812778/eclemma-coverage-view-shows-0-0-coverage#
> [2]
> https://groups.google.com/d/msgid/jacoco/deea3153-b878-49d4-97be-cbf21c658c35%40googlegroups.com?utm_medium=email&utm_source=footer
> [3] https://groups.google.com/d/optout

Reply all
Reply to author
Forward
This conversation is locked
You cannot reply and perform actions on locked conversations.
0 new messages