Test To Code Mapping

54 views
Skip to first unread message

saurabh agrawal

unread,
Apr 13, 2021, 12:35:05 AM4/13/21
to JaCoCo and EclEmma Users
I have a gradle Java web project. I am running some unit test /integration test/ api test/ui test against the application. I am using testng/junit type of tests. Is it possible to identify which test class covered which part of code.

The objective is to identify the tests which can be run to check the particular piece of code change. For eg for there is a Employee class, and three different test class T1, T2 and T3 and when I run those test class, somewhere in reports it is able to tell that Employee class code is covered by Test class T1 and T2 so that in future if there is a change in employee class in future, we can run T1 and T2.

If it is possible, can anyone guide how to configure in gradle or Jenkins.

Marc Hoffmann

unread,
Apr 14, 2021, 4:04:06 AM4/14/21
to JaCoCo and EclEmma Users
Hi,

JaCoCo as such is framework agnostic, it does not know the semantic or scope of a test case.

Additions have been developed outside the JaCoCo project to create “per test coverage”. The basic idea is to hook into the JUnit framework and trigger a separate coverage data dump after each test. 

Best 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/d72760d2-286f-4045-8ef6-5f6cebedbdc7n%40googlegroups.com.

Reply all
Reply to author
Forward
0 new messages