@API(status=MAINTAINED, since="1.0") public class SingleTestExecutor extends java.lang.Object
SingleTestExecutor
encapsulates the execution of a single test
wrapped in an SingleTestExecutor.Executable
.executeSafely(Executable)
Modifier and Type | Class | Description |
---|---|---|
static interface |
SingleTestExecutor.Executable |
Functional interface for a single test to be executed by
SingleTestExecutor . |
Constructor | Description |
---|---|
SingleTestExecutor() |
Modifier and Type | Method | Description |
---|---|---|
TestExecutionResult |
executeSafely(SingleTestExecutor.Executable executable) |
Execute the supplied
SingleTestExecutor.Executable and return a
TestExecutionResult based on the outcome. |
public TestExecutionResult executeSafely(SingleTestExecutor.Executable executable)
SingleTestExecutor.Executable
and return a
TestExecutionResult
based on the outcome.
If the Executable
throws a blacklisted exception
— for example, an OutOfMemoryError
— this method will
rethrow it.
executable
- the test to be executedExecutable
throws a TestAbortedException
;
failed if any other
Throwable
is thrown; and successful otherwise