Package net.thucydides.core.model
Enum TestResult
java.lang.Object
java.lang.Enum<TestResult>
net.thucydides.core.model.TestResult
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<TestResult>
,java.lang.constant.Constable
public enum TestResult extends java.lang.Enum<TestResult>
Acceptance test results.
Records the possible outcomes of tests within an acceptance test case
and of the overall acceptance test case itself.
- Author:
- johnsmart
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
java.lang.Enum.EnumDesc<E extends java.lang.Enum<E>>
-
Enum Constant Summary
Enum Constants Enum Constant Description COMPROMISED
Test failures due to external events or systems that compromise the validity of the test.ERROR
Test failure, due to some other exception.FAILURE
Test failure, due to an assertion error For a test case, this means one of the tests in the test case failed.IGNORED
The test or test case was deliberately ignored.PENDING
A pending test is one that has been specified but not yet implemented.SKIPPED
The test step was not executed because a previous step in this test case failed.SUCCESS
The test or test case ran as expected.UNDEFINED
Test result not known yet.UNSUCCESSFUL
Either failure, error or compromised - internal use only -
Method Summary
Modifier and Type Method Description boolean
executedResultsCount()
static boolean
existsWithName(java.lang.String expectedResult)
java.lang.String
getAdjective()
java.lang.String
getLabel()
int
getPriority()
boolean
isAtLeast(TestResult minimumTestResult)
boolean
isMoreSevereThan(TestResult otherResult)
boolean
overrides(TestResult result)
static TestResult
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.static TestResult[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.Methods inherited from class java.lang.Enum
clone, compareTo, describeConstable, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
-
Enum Constant Details
-
UNSUCCESSFUL
Either failure, error or compromised - internal use only -
COMPROMISED
Test failures due to external events or systems that compromise the validity of the test. -
ERROR
Test failure, due to some other exception. -
FAILURE
Test failure, due to an assertion error For a test case, this means one of the tests in the test case failed. -
SKIPPED
The test step was not executed because a previous step in this test case failed. A whole test case can be skipped using tags or annotations to indicate that it is currently "work-in-progress" -
IGNORED
The test or test case was deliberately ignored. Tests can be ignored via the @Ignore annotation in JUnit, for example. Ignored tests are not considered the same as pending tests: a pending test is one that has been specified, but the corresponding code is yet to be implemented, whereas an ignored test can be a temporarily-deactivated test (during refactoring, for example). -
PENDING
A pending test is one that has been specified but not yet implemented. In a JUnit test case, you can use the (Thucydides) @Pending annotation to mark this. A pending test case is a test case that has at least one pending test. -
SUCCESS
The test or test case ran as expected. -
UNDEFINED
Test result not known yet.
-
-
Method Details
-
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
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:
java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is null
-
getPriority
public int getPriority() -
overrides
-
isMoreSevereThan
-
getLabel
public java.lang.String getLabel() -
existsWithName
public static boolean existsWithName(java.lang.String expectedResult) -
isAtLeast
-
executedResultsCount
public boolean executedResultsCount() -
getAdjective
public java.lang.String getAdjective()
-