7.3. Using @IgnoreTestCoverage

Sureassert can be instructed to exempt a class, method or constructor from requiring test coverage by annotating it with the @IgnoreTestCoverage annotation.

For example to exempt a class:

@IgnoreTestCoverage
public class TestUtils {
    ...
}

To exempt a method:

@IgnoreTestCoverage
private boolean registerHighScore(String name, long highScore) throws UnknownHostException, IOException {
    ...
}

Code in any classes or methods marked with @IgnoreTestCoverage is not included in the file-level coverage calculations is never highlighted as requiring coverage.

Previous Page   |   Next Page   |   Table of Contents

Comments are closed.