Class Execution
java.lang.Object
org.junit.platform.testkit.engine.Execution
Execution encapsulates metadata for the execution of a single
TestDescriptor.- Since:
- 1.4
-
Method Summary
Modifier and TypeMethodDescriptionstatic Executionfinished(org.junit.platform.engine.TestDescriptor testDescriptor, Instant startInstant, Instant endInstant, org.junit.platform.engine.TestExecutionResult executionResult)Create a new instance of anExecutionthat finished with the providedTestExecutionResult.Get theDurationof thisExecution.Get the endInstantof thisExecution.Get the startInstantof thisExecution.Get theTerminationInfofor thisExecution.org.junit.platform.engine.TestDescriptorGet theTestDescriptorfor thisExecution.static Executionskipped(org.junit.platform.engine.TestDescriptor testDescriptor, Instant startInstant, Instant endInstant, String skipReason)Create a new instance of anExecutionthat was skipped with the providedskipReason.toString()
-
Method Details
-
finished
public static Execution finished(org.junit.platform.engine.TestDescriptor testDescriptor, Instant startInstant, Instant endInstant, org.junit.platform.engine.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(org.junit.platform.engine.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 org.junit.platform.engine.TestDescriptor 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
-