@API(status=STABLE, since="1.0") public class TestExecutionResult extends java.lang.Object
A TestExecutionResult
consists of a mandatory TestExecutionResult.Status
and
an optional Throwable
.
Modifier and Type | Class | Description |
---|---|---|
static class |
TestExecutionResult.Status |
Status of executing a single test or container.
|
Modifier and Type | Method | Description |
---|---|---|
static TestExecutionResult |
aborted(java.lang.Throwable throwable) |
Obtain a
TestExecutionResult for an aborted execution
of a test or container with the supplied throwable . |
static TestExecutionResult |
failed(java.lang.Throwable throwable) |
Obtain a
TestExecutionResult for a failed execution
of a test or container with the supplied throwable . |
TestExecutionResult.Status |
getStatus() |
Get the status of this result.
|
java.util.Optional<java.lang.Throwable> |
getThrowable() |
Get the throwable that caused this result, if available.
|
static TestExecutionResult |
successful() |
Obtain a
TestExecutionResult for a successful execution
of a test or container. |
java.lang.String |
toString() |
public static TestExecutionResult successful()
TestExecutionResult
for a successful execution
of a test or container.public static TestExecutionResult aborted(java.lang.Throwable throwable)
TestExecutionResult
for an aborted execution
of a test or container with the supplied throwable
.throwable
- the throwable that caused the aborted execution; may be nullpublic static TestExecutionResult failed(java.lang.Throwable throwable)
TestExecutionResult
for a failed execution
of a test or container with the supplied throwable
.throwable
- the throwable that caused the failed execution; may be nullpublic TestExecutionResult.Status getStatus()
public java.util.Optional<java.lang.Throwable> getThrowable()
public java.lang.String toString()
toString
in class java.lang.Object