Class Execution
- java.lang.Object
-
- org.junit.platform.testkit.engine.Execution
-
@API(status=EXPERIMENTAL, since="1.4") public class Execution extends Object
Executionencapsulates 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 Executionfinished(TestDescriptor testDescriptor, Instant startInstant, Instant endInstant, TestExecutionResult executionResult)Create a new instance of anExecutionthat finished with the providedTestExecutionResult.DurationgetDuration()Get theDurationof thisExecution.InstantgetEndInstant()Get the endInstantof thisExecution.InstantgetStartInstant()Get the startInstantof thisExecution.TerminationInfogetTerminationInfo()Get theTerminationInfofor thisExecution.TestDescriptorgetTestDescriptor()Get theTestDescriptorfor thisExecution.static Executionskipped(TestDescriptor testDescriptor, Instant startInstant, Instant endInstant, String skipReason)Create a new instance of anExecutionthat was skipped with the providedskipReason.StringtoString()
-
-
-
Method Detail
-
finished
public static Execution finished(TestDescriptor testDescriptor, Instant startInstant, Instant endInstant, TestExecutionResult executionResult)
Create a new instance of anExecutionthat finished with the providedTestExecutionResult.- Parameters:
testDescriptor- theTestDescriptorthat finished; nevernullstartInstant- theInstantthat theExecutionstarted; nevernullendInstant- theInstantthat theExecutioncompleted; nevernullexecutionResult- theTestExecutionResultof the finishedTestDescriptor; nevernull- Returns:
- the newly created
Executioninstance; nevernull
-
skipped
public static Execution skipped(TestDescriptor testDescriptor, Instant startInstant, Instant endInstant, String skipReason)
Create a new instance of anExecutionthat was skipped with the providedskipReason.- Parameters:
testDescriptor- theTestDescriptorthat finished; nevernullstartInstant- theInstantthat theExecutionstarted; nevernullendInstant- theInstantthat theExecutioncompleted; nevernullskipReason- the reason theTestDescriptorwas skipped; may benull- Returns:
- the newly created
Executioninstance; nevernull
-
getTestDescriptor
public TestDescriptor getTestDescriptor()
Get theTestDescriptorfor thisExecution.- Returns:
- the
TestDescriptorfor thisExecution
-
getStartInstant
public Instant getStartInstant()
Get the startInstantof thisExecution.- Returns:
- the start
Instantof thisExecution
-
getEndInstant
public Instant getEndInstant()
Get the endInstantof thisExecution.- Returns:
- the end
Instantof thisExecution
-
getDuration
public Duration getDuration()
Get theDurationof thisExecution.- Returns:
- the
Durationof thisExecution
-
getTerminationInfo
public TerminationInfo getTerminationInfo()
Get theTerminationInfofor thisExecution.- Returns:
- the
TerminationInfofor thisExecution
-
-