How to exclude the code coverage for the specific methods using annotations?

42 views
Skip to first unread message

manju...@ilimi.in

unread,
Nov 13, 2019, 6:30:32 AM11/13/19
to JaCoCo and EclEmma Users

public class Something
{
    @ExcludeFromCodeCoverage // Some annotation to exclude the code coverage computation for this method.
    public void someMethod() {}
}
Anyone knows about it ? How to exclude the code coverage computation for the specifi methods?

Marc Hoffmann

unread,
Nov 13, 2019, 9:08:30 AM11/13/19
to jac...@googlegroups.com
Hi,

if you annotate you class with an annotation with local name “Generated” (any package) which has CLASS or RUNTIME visibility JaCoCo will filter this method.

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/a9dd8e83-4482-475b-882f-17df5eb578d7%40googlegroups.com.

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