java.lang.Object
org.junit.platform.testkit.engine.Execution
@API(status=MAINTAINED, since="1.7") public class Execution extends Object
Execution
encapsulates metadata for the execution of a single
TestDescriptor
.- Since:
- 1.4
-
Method Summary
Modifier and Type Method Description static Execution
finished(TestDescriptor testDescriptor, Instant startInstant, Instant endInstant, TestExecutionResult executionResult)
Create a new instance of anExecution
that finished with the providedTestExecutionResult
.Duration
getDuration()
Get theDuration
of thisExecution
.Instant
getEndInstant()
Get the endInstant
of thisExecution
.Instant
getStartInstant()
Get the startInstant
of thisExecution
.TerminationInfo
getTerminationInfo()
Get theTerminationInfo
for thisExecution
.TestDescriptor
getTestDescriptor()
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
.String
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
-