Enum TestResultStatus

java.lang.Object
java.lang.Enum<TestResultStatus>
org.testframe.engine.TestResultStatus
All Implemented Interfaces:
Serializable, Comparable<TestResultStatus>, java.lang.constant.Constable

public enum TestResultStatus extends Enum<TestResultStatus>
Enumerates the four possible outcomes of running a test: it passed, it failed, it was skipped or it caused an error. Tests are annotated with the annotation Test.
Since:
1.0
Author:
Alonso del Arte
  • Enum Constant Details

    • PASSED

      public static final TestResultStatus PASSED
      Indicates the test passed. Generally associated with the color green.
    • SKIPPED

      public static final TestResultStatus SKIPPED
      Indicates the test was skipped. Generally associated with gray. A skipped test must be annotated with both Skip and Test or else it will be ignored by the test runner.
    • ERROR

      public static final TestResultStatus ERROR
      Indicates the test caused an unexpected error or exception. Generally associated with the color red. There is some difference of opinion as to whether or not a test that caused an unforeseen error or exception failed or not. In my opinion, if a test caused an unforeseen error or exception, it's neither a pass nor a failure, but an interruption of the test-driven development process that needs to be addressed before getting back to the normal test-driven development (TDD) cycle.
    • FAILED

      public static final TestResultStatus FAILED
      Indicates the test failed. Generally associated with the color yellow. The developer should check that the test failed for the expected reason.
  • Method Details

    • values

      public static TestResultStatus[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      Returns:
      an array containing the constants of this enum type, in the order they are declared
    • valueOf

      public static TestResultStatus valueOf(String name)
      Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum type has no constant with the specified name
      NullPointerException - if the argument is null