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

> On 5. Mar 2025, at 04:08, Rajeev Nandan <rajeevm...@gmail.com> wrote:
> 
> 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
> 
> On Wed, 5 Mar 2025 at 12:21 AM, Marc Hoffmann <hoffm...@mountainminds.com 
> <mailto:hoffm...@mountainminds.com>> wrote:
>> 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
>> 
>>> On 3. Mar 2025, at 20:13, Prabitha Susil <prabithasu...@gmail.com 
>>> <mailto:prabithasu...@gmail.com>> wrote:
>>> 
>>> 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
>> 
>>> 
>>> -- 
>>> 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+unsubscr...@googlegroups.com 
>>> <mailto:jacoco+unsubscr...@googlegroups.com>.
>>> To view this discussion visit 
>>> https://groups.google.com/d/msgid/jacoco/CAMf5NwT%3DkQFOzHj%2BObQa-uKfUHcWBhLuxPh-8tMv4MMzkoGLoQ%40mail.gmail.com
>>>  
>>> <https://groups.google.com/d/msgid/jacoco/CAMf5NwT%3DkQFOzHj%2BObQa-uKfUHcWBhLuxPh-8tMv4MMzkoGLoQ%40mail.gmail.com?utm_medium=email&utm_source=footer>.
>> 
>> 
>> -- 
>> 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+unsubscr...@googlegroups.com 
>> <mailto:jacoco+unsubscr...@googlegroups.com>.
>> To view this discussion visit 
>> https://groups.google.com/d/msgid/jacoco/C2B6D986-C5EF-4B87-83D3-426619C7845D%40mountainminds.com
>>  
>> <https://groups.google.com/d/msgid/jacoco/C2B6D986-C5EF-4B87-83D3-426619C7845D%40mountainminds.com?utm_medium=email&utm_source=footer>.
> 
> 
> -- 
> 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+unsubscr...@googlegroups.com 
> <mailto:jacoco+unsubscr...@googlegroups.com>.
> To view this discussion visit 
> https://groups.google.com/d/msgid/jacoco/CACQZ1%3DEZLceqJZ29RLRFTUs3yGgT99mxsP4qBTThssUuH852qA%40mail.gmail.com
>  
> <https://groups.google.com/d/msgid/jacoco/CACQZ1%3DEZLceqJZ29RLRFTUs3yGgT99mxsP4qBTThssUuH852qA%40mail.gmail.com?utm_medium=email&utm_source=footer>.

-- 
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+unsubscr...@googlegroups.com.
To view this discussion visit 
https://groups.google.com/d/msgid/jacoco/04F30A1A-157A-4BFE-8CFF-A2FB5BC75532%40mountainminds.com.

Reply via email to