Option to disable the feature "Exclude dynamically generated classes from instrumentation"?

122 views
Skip to first unread message

john...@veeva.com

unread,
Oct 20, 2016, 6:05:21 PM10/20/16
to JaCoCo and EclEmma Users
When doing on-the-fly instrumentation and reporting on the same code/test run I noticed that the coverage % dropped starting in JaCoCo 0.7.3. It seem like it was due to a new feature that excluded dynamically generated classes. Is there an option to disable this feature? If not I will be stuck using 0.7.2. Thanks.

Marc Hoffmann

unread,
Oct 21, 2016, 7:00:04 AM10/21/16
to jac...@googlegroups.com
Hi,

exclusion of dynamically generated classes only applies to runtime. For
report generation these classes have never been shown. So I don't think
this causes the difference.

When you compare both reports please drill down to a specific class
where you see differences and show differences here (e.g. with
screenshots).

Regards,
-marc

Evgeny Mandrikov

unread,
Oct 25, 2016, 12:57:53 PM10/25/16
to JaCoCo and EclEmma Users
Hi,

Maybe there is a bit of misunderstanding: indeed there was a change in 0.7.3 - classes without source location ignored, but version 0.7.6 introduces option "inclnolocationclasses" to control this behavior.  See http://www.eclemma.org/jacoco/trunk/doc/changes.html

Hope this helps.

Best regards,
Evgeny
Message has been deleted
Message has been deleted

john...@veeva.com

unread,
Oct 25, 2016, 4:30:01 PM10/25/16
to JaCoCo and EclEmma Users

Hi Marc, thanks for the reply but after looking at this some more the classes with this issue are not dynamically generated so it must be some other cause.

john...@veeva.com

unread,
Oct 25, 2016, 4:33:52 PM10/25/16
to JaCoCo and EclEmma Users
Hi Evgeny, thanks for the reply but looking at this again the classes that showed 0% coverage are not dynamically generated classes and they have source locations. So the cause of this issue is something else.

Evgeny Mandrikov

unread,
Oct 25, 2016, 5:45:18 PM10/25/16
to JaCoCo and EclEmma Users, john...@veeva.com
This sounds really weird, because there is no other changes between 0.7.2 and 0.7.3 that could lead to this. Might it be a misconfiguration on your side? Could you provide a small reproducer?

john...@veeva.com

unread,
Oct 25, 2016, 6:28:44 PM10/25/16
to JaCoCo and EclEmma Users
There are no configuration changes, the only difference is the JaCoCo version. Here are the detailed steps of what I am doing, it might be this sequence of steps that this issue occurs.

1. Execute my java unit and integration tests via maven using jacoco-maven-plugin
2. jacoco-ut.exec and jacoco-it.exec files generated for all the different projects
3. Merge all the .exec files into one file using jacoco-maven-plugin
4. Generate coverage html report on the merged .exec file using the jacoco Ant report task

Evgeny Mandrikov

unread,
Oct 26, 2016, 7:16:29 AM10/26/16
to JaCoCo and EclEmma Users, john...@veeva.com
Those steps are too generic, so I wouldn't name them as reproducer. And they are covered by our integration tests. By reproducer I meant a small example project, which we would be able to execute.

And anyway I would advice you to try latest JaCoCo version 0.7.7 with option "inclnolocationclasses=true", because once again - this is the only notable change between 0.7.2 and 0.7.3.

john...@veeva.com

unread,
Nov 2, 2016, 8:19:07 PM11/2/16
to JaCoCo and EclEmma Users, john...@veeva.com
Thanks Evgeny. I'll try out 0.7.7 with inclnolocationclasses=true
Reply all
Reply to author
Forward
This conversation is locked
You cannot reply and perform actions on locked conversations.
0 new messages