java.lang.Object
org.junit.platform.testkit.engine.Execution
Execution
encapsulates metadata for the execution of a single
TestDescriptor
.- Since:
- 1.4
-
Method Summary
Modifier and TypeMethodDescriptionstatic Execution
finished
(TestDescriptor testDescriptor, Instant startInstant, Instant endInstant, TestExecutionResult executionResult) Create a new instance of anExecution
that finished with the providedTestExecutionResult
.Get theDuration
of thisExecution
.Get the endInstant
of thisExecution
.Get the startInstant
of thisExecution
.Get theTerminationInfo
for thisExecution
.Get theTestDescriptor
for thisExecution
.static Execution
skipped
(TestDescriptor testDescriptor, Instant startInstant, Instant endInstant, String skipReason) Create a new instance of anExecution
that was skipped with the providedskipReason
.toString()
-
Method Details
-
finished
public static Execution finished(TestDescriptor testDescriptor, Instant startInstant, Instant endInstant, TestExecutionResult executionResult) Create a new instance of anExecution
that finished with the providedTestExecutionResult
.- Parameters:
testDescriptor
- theTestDescriptor
that finished; nevernull
startInstant
- theInstant
that theExecution
started; nevernull
endInstant
- theInstant
that theExecution
completed; nevernull
executionResult
- theTestExecutionResult
of the finishedTestDescriptor
; nevernull
- Returns:
- the newly created
Execution
instance; nevernull
-
skipped
public static Execution skipped(TestDescriptor testDescriptor, Instant startInstant, Instant endInstant, String skipReason) Create a new instance of anExecution
that was skipped with the providedskipReason
.- Parameters:
testDescriptor
- theTestDescriptor
that finished; nevernull
startInstant
- theInstant
that theExecution
started; nevernull
endInstant
- theInstant
that theExecution
completed; nevernull
skipReason
- the reason theTestDescriptor
was skipped; may benull
- Returns:
- the newly created
Execution
instance; nevernull
-
getTestDescriptor
Get theTestDescriptor
for thisExecution
.- Returns:
- the
TestDescriptor
for thisExecution
-
getStartInstant
Get the startInstant
of thisExecution
.- Returns:
- the start
Instant
of thisExecution
-
getEndInstant
Get the endInstant
of thisExecution
.- Returns:
- the end
Instant
of thisExecution
-
getDuration
Get theDuration
of thisExecution
.- Returns:
- the
Duration
of thisExecution
-
getTerminationInfo
Get theTerminationInfo
for thisExecution
.- Returns:
- the
TerminationInfo
for thisExecution
-
toString
-