Hi,

not sure whether I understand you question correctly.

> I am concerned that inserting probes for every statement in the entire 
> project would result in an excessively large array.


This is the core functionality of JaCoCo. We do actually not insert probes 
after every instruction. Instead we insert a few probes at strategic position 
into the control flow so that we can infer the execution status of every 
instruction and branch at analysis time. You can read about this here: 
https://www.jacoco.org/jacoco/trunk/doc/flow.html

JaCoCo is actually used by very large projects since many years.

Regards,
-marc





> On 10. Aug 2024, at 15:58, m1k0 <caowanying...@gmail.com> wrote:
> 
> Dear Team,
> 
> I hope this message finds you well. I am a newcomer to both Java and JaCoCo, 
> and I am currently looking to collect information on all executed statements 
> within a Java library when running a specific test method. I would like to 
> know if it is possible to achieve this by modifying JaCoCo.
> 
> From my research, it seems that JaCoCo might not be able to target specific 
> test methods directly. I ran the entire test class 'TestClass', using the 
> following command:
> 
> java -javaagent:/workspace/jacocoagent.jar=destfile=/workspace/jacoco.exec 
> -cp 
> /workspace/project-sourceCode.jar:/workspace/build-tests/:/workspace/junit.jar
>  junit.textui.TestRunner TestClass
> 
> However, this still does not meet my exact needs. I am concerned that 
> inserting probes for every statement in the entire project would result in an 
> excessively large array. I am unsure whether JaCoCo can be further customized 
> to fulfill my requirements.
> 
> I would greatly appreciate any guidance or suggestions you could offer.
> 
> Thank you very much for your time and assistance.
> 
> 
> 
> -- 
> 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 on the web visit 
> https://groups.google.com/d/msgid/jacoco/7af116ed-779e-490a-821e-d853f77ce8d3n%40googlegroups.com
>  
> <https://groups.google.com/d/msgid/jacoco/7af116ed-779e-490a-821e-d853f77ce8d3n%40googlegroups.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 on the web visit 
https://groups.google.com/d/msgid/jacoco/93D55BD4-C7C3-4143-9E68-67ED992E0C5D%40mountainminds.com.

Reply via email to