- All Implemented Interfaces:
public class RuntimeIgnoreException
- extends Error
Indicates that a test case should be skipped. Throwing this exception allows to skip a test case
dynamically at runtime. This is useful if a test case relies on some assumption that may not be
true in all environments. Note that this only works if the appropriate test runner is configured.
It should also be noted that there are alternative techniques that may be more appropriate in
some use cases:
- Simply return from the test method if the expectation about the runtime environment is not
met. This is simpler, but has the disadvantage that the test case is counted as successful
instead of skipped.
- Using a Maven profile to exclude tests. This is more appropriate e.g. to exclude test cases
that apply only to some Java versions.
- See Also:
|Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
public RuntimeIgnoreException(String message)
Copyright © 2004-2012 The Apache Software Foundation. All Rights Reserved.