Class UnifiedJUnit4Listener
java.lang.Object
org.junit.runner.notification.RunListener
io.github.mov2day.unifiedtest.reporting.UnifiedJUnit4Listener
public class UnifiedJUnit4Listener
extends org.junit.runner.notification.RunListener
JUnit 4 test listener that integrates with UnifiedTest reporting.
Captures JUnit4 test execution events and forwards them to the UnifiedTest collector and reporter.
-
Nested Class Summary
Nested classes/interfaces inherited from class org.junit.runner.notification.RunListener
org.junit.runner.notification.RunListener.ThreadSafe -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidsetCollectorAndReporter(UnifiedTestResultCollector collector, ConsoleReporter reporter) Sets the collector and reporter for the listener.voidtestAssumptionFailure(org.junit.runner.notification.Failure failure) voidtestFailure(org.junit.runner.notification.Failure failure) voidtestFinished(org.junit.runner.Description description) voidtestIgnored(org.junit.runner.Description description) voidtestRunFinished(org.junit.runner.Result result) voidtestStarted(org.junit.runner.Description description) Methods inherited from class org.junit.runner.notification.RunListener
testRunStarted, testSuiteFinished, testSuiteStarted
-
Constructor Details
-
UnifiedJUnit4Listener
public UnifiedJUnit4Listener()
-
-
Method Details
-
setCollectorAndReporter
public static void setCollectorAndReporter(UnifiedTestResultCollector collector, ConsoleReporter reporter) Sets the collector and reporter for the listener. This method should be called before test execution starts.- Parameters:
collector- the test result collectorreporter- the console reporter
-
testStarted
public void testStarted(org.junit.runner.Description description) - Overrides:
testStartedin classorg.junit.runner.notification.RunListener
-
testFailure
public void testFailure(org.junit.runner.notification.Failure failure) - Overrides:
testFailurein classorg.junit.runner.notification.RunListener
-
testIgnored
public void testIgnored(org.junit.runner.Description description) - Overrides:
testIgnoredin classorg.junit.runner.notification.RunListener
-
testAssumptionFailure
public void testAssumptionFailure(org.junit.runner.notification.Failure failure) - Overrides:
testAssumptionFailurein classorg.junit.runner.notification.RunListener
-
testFinished
public void testFinished(org.junit.runner.Description description) - Overrides:
testFinishedin classorg.junit.runner.notification.RunListener
-
testRunFinished
public void testRunFinished(org.junit.runner.Result result) - Overrides:
testRunFinishedin classorg.junit.runner.notification.RunListener
-