Class Execution
- java.lang.Object
-
- org.junit.platform.testkit.engine.Execution
-
@API(status=EXPERIMENTAL, since="1.4") public class Execution extends Object
Execution
encapsulates metadata for the execution of a singleTestDescriptor
.- Since:
- 1.4
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods 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 Detail
-
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
public TestDescriptor getTestDescriptor()
Get theTestDescriptor
for thisExecution
.- Returns:
- the
TestDescriptor
for thisExecution
-
getStartInstant
public Instant getStartInstant()
Get the startInstant
of thisExecution
.- Returns:
- the start
Instant
of thisExecution
-
getEndInstant
public Instant getEndInstant()
Get the endInstant
of thisExecution
.- Returns:
- the end
Instant
of thisExecution
-
getDuration
public Duration getDuration()
Get theDuration
of thisExecution
.- Returns:
- the
Duration
of thisExecution
-
getTerminationInfo
public TerminationInfo getTerminationInfo()
Get theTerminationInfo
for thisExecution
.- Returns:
- the
TerminationInfo
for thisExecution
-
-