Is TestClass necessary for all the code that are being tested for coverage ?

28 views
Skip to first unread message

usha viswanathan

unread,
May 28, 2018, 7:21:59 AM5/28/18
to JaCoCo and EclEmma Users
Hi,

I referred a video here telling that if you increase the test case conditions, then the percentage of coverage will increase.

https://www.youtube.com/watch?v=7wann9aJbNg


Is there any other way that you can increase the percentage of coverage ? 

 

usha viswanathan

unread,
May 30, 2018, 12:30:29 AM5/30/18
to JaCoCo and EclEmma Users
Could anyone please elaborate on this ?

I found that for some of the classes, even if there is no test class, tests are being covered on some parts for the class and there is "zero code coverage" on other classes that do not have tests.

I dont know how the coverage runs for one class and not running for other

Thanks,

Marc Hoffmann

unread,
May 30, 2018, 1:31:19 AM5/30/18
to jac...@googlegroups.com
JaCoCo reports all code that have been executed during a Java program execution. It has no idea about unit tests. So if ATest tests A an A internally uses B then B will also show as executed.

If a class is never executed (directly called by a test or indirectly) it will not show as executed.

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/3574124e-19ce-4d2a-a05d-243773285c75%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
This conversation is locked
You cannot reply and perform actions on locked conversations.
0 new messages