Groups
Groups
Conversations
All groups and messages
Send feedback to Google
Help
Training
Groups
Groups

Reg: Capturing method data for cases run parallelly

23 views
Skip to first unread message
Prabitha Susil's profile photo

Prabitha Susil

unread,
Mar 3, 2025, 11:13:38 PM3/3/25
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to jac...@googlegroups.com

Hi Team,

 

I am using jacoco for capturing the class and method level data that is being touched by my test case. I am currently doing this by serially running one case after other to capture the data. This is intern taking a lot of time.

Is it possible to run scripts / test cases parallelly capturing the data touched by each case separately.


Thanks,

Prabitha

Marc Hoffmann's profile photo

Marc Hoffmann

unread,
Mar 4, 2025, 1:51:21 PM3/4/25
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to jac...@googlegroups.com
Hi Prabitha,

execution data is written in a global, shared store. If you run multiple test cases within the same JVM in parallel we cannot keep execution information apart.

The only option I see is to parallelize your tests in multiple JVMs.

Out of curiosity: Can you please share a bit about your use case? How are you processing and using the per-test coverage data?

Cheers,
-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 visit https://groups.google.com/d/msgid/jacoco/CAMf5NwT%3DkQFOzHj%2BObQa-uKfUHcWBhLuxPh-8tMv4MMzkoGLoQ%40mail.gmail.com.

Rajeev Nandan's profile photo

Rajeev Nandan

unread,
Mar 4, 2025, 10:08:28 PM3/4/25
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to jac...@googlegroups.com
Hi Marc, 

I had the same use case where i wanted to capture code coverage for each test case separately.

Our use case was to find duplicate tests in a service under test. Here a test case means one api call or kafka consumption to the service under test. 

We wrote a java agent which identifies end of a test case abd then export the coverage data to an exec file. But this approach works only if we are running test cases one by one.

Can we tweak usage of session id and use it as test case id to store coverage data separately?


Thanks and regards,
Rajeev Nandan

Prabitha Susil's profile photo

Prabitha Susil

unread,
Mar 7, 2025, 9:42:28 PM3/7/25
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to jac...@googlegroups.com
Thanks Marc for that confirmation. We use this data to run only test cases that would be impacted due to a particular transaction change on the application.

Marc Hoffmann's profile photo

Marc Hoffmann

unread,
Mar 13, 2025, 12:10:51 PM3/13/25
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to jac...@googlegroups.com
Hi Rajeev,

it is not about the session id. It is about the execution data storage: JaCoCo probes are stored in static fields. We cannot distinguish between concurrent test runs as we don’t have separate storage for them.

Regard,
-marc

Reply all
Reply to author
Forward
0 new messages
Morty Proxy This is a proxified and sanitized view of the page, visit original site.
Search
Clear search
Close search
Google apps
Main menu