Class UnifiedJUnit5Listener
java.lang.Object
io.github.mov2day.unifiedtest.reporting.UnifiedJUnit5Listener
- All Implemented Interfaces:
org.junit.platform.launcher.TestExecutionListener
public class UnifiedJUnit5Listener
extends Object
implements org.junit.platform.launcher.TestExecutionListener
JUnit 5 test execution listener that integrates with UnifiedTest reporting.
Captures test execution events and forwards them to the UnifiedTest collector and reporter.
-
Constructor Summary
ConstructorsConstructorDescriptionCreates a new listener with default configuration.UnifiedJUnit5Listener(UnifiedTestResultCollector collector, ConsoleReporter reporter) Creates a new listener with the specified collector and reporter. -
Method Summary
Modifier and TypeMethodDescriptionvoidexecutionFinished(org.junit.platform.launcher.TestIdentifier testIdentifier, org.junit.platform.engine.TestExecutionResult testExecutionResult) voidexecutionStarted(org.junit.platform.launcher.TestIdentifier testIdentifier) static voidsetCollectorAndReporter(UnifiedTestResultCollector collector, ConsoleReporter reporter) Sets the test result collector and console reporter for this listener.voidtestPlanExecutionFinished(org.junit.platform.launcher.TestPlan testPlan) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.junit.platform.launcher.TestExecutionListener
dynamicTestRegistered, executionSkipped, reportingEntryPublished, testPlanExecutionStarted
-
Constructor Details
-
UnifiedJUnit5Listener
public UnifiedJUnit5Listener()Creates a new listener with default configuration. -
UnifiedJUnit5Listener
Creates a new listener with the specified collector and reporter.- Parameters:
collector- the test result collectorreporter- the console reporter
-
-
Method Details
-
setCollectorAndReporter
public static void setCollectorAndReporter(UnifiedTestResultCollector collector, ConsoleReporter reporter) Sets the test result collector and console reporter for this listener. Must be called before test execution starts.- Parameters:
collector- the test result collectorreporter- the console reporter
-
executionStarted
public void executionStarted(org.junit.platform.launcher.TestIdentifier testIdentifier) - Specified by:
executionStartedin interfaceorg.junit.platform.launcher.TestExecutionListener
-
executionFinished
public void executionFinished(org.junit.platform.launcher.TestIdentifier testIdentifier, org.junit.platform.engine.TestExecutionResult testExecutionResult) - Specified by:
executionFinishedin interfaceorg.junit.platform.launcher.TestExecutionListener
-
testPlanExecutionFinished
public void testPlanExecutionFinished(org.junit.platform.launcher.TestPlan testPlan) - Specified by:
testPlanExecutionFinishedin interfaceorg.junit.platform.launcher.TestExecutionListener
-