Need some help to understand when this($EnhancerBySpringCGLIB$$f4601f39") will be added into jacoco.exec file.

38 views
Skip to first unread message

Hunk Huang

unread,
Dec 20, 2023, 3:28:56 PM12/20/23
to JaCoCo and EclEmma Users
Hi Folks,

I'm working on generating coverage data per test. The solution is add a new test listener when test start, the listener will create a new jacoco session and when test finsihed, the listener will dump data into jacoco.exec file. which is working fine. 

However when I check the exec file. During test cases excution, it's also including some class which is not been used by this test case.  it might related to spring, sampe as:

**$EnhancerBySpringCGLIB$$f4601f39"** 

Does anyone know when this been generated is it really used by test case or we can skip it.


Thanks,
Hunk

Marc Hoffmann

unread,
Dec 27, 2023, 5:32:33 AM12/27/23
to JaCoCo and EclEmma Users
Dear Hunk,

absolutely, Spring creates lots of classes that serve as “glue” between the beans. If you want to know when such classes are generated you better check with the Spring project.

Typically generated code is not considered for code coverage.

Regards,
-marc

--
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/4b8a24d2-a428-4596-ade3-ee3007c26be9n%40googlegroups.com.

Reply all
Reply to author
Forward
0 new messages