0

How to configure code coverage to ignore lines?

We're using the IntelliJ IDEA code coverage runner. We've got some code within classes where we don't want the code coverage to run. Things like extreme conditions or places where writing a test to cover that very specific case just isn't possible.

Is there an annotation or "special comment" (eg., "// START CODE COVERAGE IGNORE", "// END CODE COVERAGE IGNORE") that we can apply?

Note that the case isn't where we want to exclude an entire package or class, just parts within classes.

Thanks,

jay

3 comments

Please sign in to leave a comment.