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 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 Details
-
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
Get theTestDescriptorfor thisExecution.- Returns:
- the
TestDescriptorfor thisExecution
-
getStartInstant
Get the startInstantof thisExecution.- Returns:
- the start
Instantof thisExecution
-
getEndInstant
Get the endInstantof thisExecution.- Returns:
- the end
Instantof thisExecution
-
getDuration
Get theDurationof thisExecution.- Returns:
- the
Durationof thisExecution
-
getTerminationInfo
Get theTerminationInfofor thisExecution.- Returns:
- the
TerminationInfofor thisExecution
-
toString
-