JaCoCo - cannot get 100% branch coverage for Groovy's "assert" statements

41 views
Skip to first unread message

Damir Murat

unread,
Oct 5, 2020, 1:41:34 PM10/5/20
to JaCoCo and EclEmma Users
I'm not able to get 100% branch coverage for Groovy's "assert" statements. After looking into the generated code (decompiled via IDEA), it seems to me that the problem is related to the following JaCoCo issue: https://github.com/jacoco/jacoco/pull/321

If so, I wonder what the status of this issue is? Are there any plans to tackle it, maybe? From the discussion, it looks like upstream projects are real blockers.

From the user perspective, it is unfortunate to have this limitation, since "asserts" are commonly used in Groovy all over the place for precondition checking in pour-man design-by-contract style. In the report, it is hard to distinguish those false warnings from real missed branches.

Tnx,
Damir

Ivan Krnic

unread,
Oct 9, 2020, 3:30:53 AM10/9/20
to JaCoCo and EclEmma Users
I'm also experiencing this Groovy assert issue. It would be great to have it work correctly.
Thanks
Ivan
Reply all
Reply to author
Forward
0 new messages