Hi Firhard,

JaCoCo is framework agnostic. It simply records all executed code. JaCoCo does 
not know the difference between test code and application code. Als JaCoCo does 
not track call hierarchies. So unfortunately what you want is not possible.

Regards,
-marc


> On 14. Jun 2023, at 17:51, Firhard Roslan <[email protected]> wrote:
> 
> Hi there,
> 
> I am trying to get the coverage of direct invocation of the method from the 
> test suite.
> 
> As an example,
> @Test
> public void testPublicMethod()
> {
>     App app = new App();
>     int x = app.publicMethod();
>     assertEquals(x,10);
> }
> 
> Assuming that publicMethod() calls another method internally, JaCoCo will 
> also make the other method as being covered. Is there a way to only collect 
> the method that is being called by the test cases directly?
> 
> Many thanks
> Firhard
> 
> -- 
> 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 [email protected] 
> <mailto:[email protected]>.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/jacoco/6e4a8003-3aab-4300-9af8-3553e0ceb5c7n%40googlegroups.com
>  
> <https://groups.google.com/d/msgid/jacoco/6e4a8003-3aab-4300-9af8-3553e0ceb5c7n%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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jacoco/6E37FCFE-10E4-4213-9723-A42E78EEA642%40mountainminds.com.

Reply via email to