- java.lang.Object
-
- org.junit.platform.jfr.FlightRecordingListener
-
- All Implemented Interfaces:
TestExecutionListener
@API(status=EXPERIMENTAL, since="1.7") public class FlightRecordingListener extends Object implements TestExecutionListener
ATestExecutionListenerthat generates Java Flight Recorder events.- Since:
- 1.7
- See Also:
- JEP 328: Flight Recorder
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interfaceFlightRecordingListener.UniqueId
-
Constructor Summary
Constructors Constructor Description FlightRecordingListener()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidexecutionFinished(TestIdentifier test, TestExecutionResult result)Called when the execution of a leaf or subtree of theTestPlanhas finished, regardless of the outcome.voidexecutionSkipped(TestIdentifier test, String reason)Called when the execution of a leaf or subtree of theTestPlanhas been skipped.voidexecutionStarted(TestIdentifier test)Called when the execution of a leaf or subtree of theTestPlanis about to be started.voidreportingEntryPublished(TestIdentifier test, ReportEntry reportEntry)Called when additional test reporting data has been published for the suppliedTestIdentifier.voidtestPlanExecutionFinished(TestPlan plan)Called when the execution of theTestPlanhas finished, after all tests have been executed.voidtestPlanExecutionStarted(TestPlan plan)Called when the execution of theTestPlanhas started, before any test has been executed.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.junit.platform.launcher.TestExecutionListener
dynamicTestRegistered
-
-
-
-
Method Detail
-
testPlanExecutionStarted
public void testPlanExecutionStarted(TestPlan plan)
Description copied from interface:TestExecutionListenerCalled when the execution of theTestPlanhas started, before any test has been executed.- Specified by:
testPlanExecutionStartedin interfaceTestExecutionListener- Parameters:
plan- describes the tree of tests about to be executed
-
testPlanExecutionFinished
public void testPlanExecutionFinished(TestPlan plan)
Description copied from interface:TestExecutionListenerCalled when the execution of theTestPlanhas finished, after all tests have been executed.- Specified by:
testPlanExecutionFinishedin interfaceTestExecutionListener- Parameters:
plan- describes the tree of tests that have been executed
-
executionSkipped
public void executionSkipped(TestIdentifier test, String reason)
Description copied from interface:TestExecutionListenerCalled when the execution of a leaf or subtree of theTestPlanhas been skipped.The
TestIdentifiermay represent a test or a container. In the case of a container, no listener methods will be called for any of its descendants.A skipped test or subtree of tests will never be reported as started or finished.
- Specified by:
executionSkippedin interfaceTestExecutionListener- Parameters:
test- the identifier of the skipped test or containerreason- a human-readable message describing why the execution has been skipped
-
executionStarted
public void executionStarted(TestIdentifier test)
Description copied from interface:TestExecutionListenerCalled when the execution of a leaf or subtree of theTestPlanis about to be started.The
TestIdentifiermay represent a test or a container.This method will only be called if the test or container has not been skipped.
This method will be called for a container
TestIdentifierbefore starting or skipping any of its children.- Specified by:
executionStartedin interfaceTestExecutionListener- Parameters:
test- the identifier of the started test or container
-
executionFinished
public void executionFinished(TestIdentifier test, TestExecutionResult result)
Description copied from interface:TestExecutionListenerCalled when the execution of a leaf or subtree of theTestPlanhas finished, regardless of the outcome.The
TestIdentifiermay represent a test or a container.This method will only be called if the test or container has not been skipped.
This method will be called for a container
TestIdentifierafter all of its children have been skipped or have finished.The
TestExecutionResultdescribes the result of the execution for the suppliedTestIdentifier. The result does not include or aggregate the results of its children. For example, a container with a failing test will be reported asSUCCESSFULeven if one or more of its children are reported asFAILED.- Specified by:
executionFinishedin interfaceTestExecutionListener- Parameters:
test- the identifier of the finished test or containerresult- the (unaggregated) result of the execution for the suppliedTestIdentifier- See Also:
TestExecutionResult
-
reportingEntryPublished
public void reportingEntryPublished(TestIdentifier test, ReportEntry reportEntry)
Description copied from interface:TestExecutionListenerCalled when additional test reporting data has been published for the suppliedTestIdentifier.Can be called at any time during the execution of a test plan.
- Specified by:
reportingEntryPublishedin interfaceTestExecutionListener- Parameters:
test- describes the test or container to which the entry pertainsreportEntry- the publishedReportEntry
-
-