Class RuntimeIgnoreException

java.lang.Object
java.lang.Throwable
java.lang.Error
org.apache.axis2.testutils.RuntimeIgnoreException
All Implemented Interfaces:
Serializable

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:
  • Constructor Details

    • RuntimeIgnoreException

      public RuntimeIgnoreException(String message)