Class Execution
- java.lang.Object
-
- org.junit.platform.testkit.engine.Execution
-
@API(status=MAINTAINED, since="1.7") public class Execution extends java.lang.ObjectExecutionencapsulates metadata for the execution of a singleTestDescriptor.- Since:
- 1.4
-
-
Field Summary
Fields Modifier and Type Field Description private java.time.Durationdurationprivate java.time.InstantendInstantprivate java.time.InstantstartInstantprivate TerminationInfoterminationInfoprivate TestDescriptortestDescriptor
-
Constructor Summary
Constructors Modifier Constructor Description privateExecution(TestDescriptor testDescriptor, java.time.Instant startInstant, java.time.Instant endInstant, TerminationInfo terminationInfo)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static Executionfinished(TestDescriptor testDescriptor, java.time.Instant startInstant, java.time.Instant endInstant, TestExecutionResult executionResult)Create a new instance of anExecutionthat finished with the providedTestExecutionResult.java.time.DurationgetDuration()Get theDurationof thisExecution.java.time.InstantgetEndInstant()Get the endInstantof thisExecution.java.time.InstantgetStartInstant()Get the startInstantof thisExecution.TerminationInfogetTerminationInfo()Get theTerminationInfofor thisExecution.TestDescriptorgetTestDescriptor()Get theTestDescriptorfor thisExecution.static Executionskipped(TestDescriptor testDescriptor, java.time.Instant startInstant, java.time.Instant endInstant, java.lang.String skipReason)Create a new instance of anExecutionthat was skipped with the providedskipReason.java.lang.StringtoString()
-
-
-
Field Detail
-
testDescriptor
private final TestDescriptor testDescriptor
-
startInstant
private final java.time.Instant startInstant
-
endInstant
private final java.time.Instant endInstant
-
duration
private final java.time.Duration duration
-
terminationInfo
private final TerminationInfo terminationInfo
-
-
Constructor Detail
-
Execution
private Execution(TestDescriptor testDescriptor, java.time.Instant startInstant, java.time.Instant endInstant, TerminationInfo terminationInfo)
-
-
Method Detail
-
finished
public static Execution finished(TestDescriptor testDescriptor, java.time.Instant startInstant, java.time.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, java.time.Instant startInstant, java.time.Instant endInstant, java.lang.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 java.time.Instant getStartInstant()
Get the startInstantof thisExecution.- Returns:
- the start
Instantof thisExecution
-
getEndInstant
public java.time.Instant getEndInstant()
Get the endInstantof thisExecution.- Returns:
- the end
Instantof thisExecution
-
getDuration
public java.time.Duration getDuration()
Get theDurationof thisExecution.- Returns:
- the
Durationof thisExecution
-
getTerminationInfo
public TerminationInfo getTerminationInfo()
Get theTerminationInfofor thisExecution.- Returns:
- the
TerminationInfofor thisExecution
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-