Class JUnit4RunListener
java.lang.Object
org.junit.runner.notification.RunListener
org.apache.maven.surefire.common.junit4.JUnit4RunListener
public class JUnit4RunListener
extends org.junit.runner.notification.RunListener
RunListener for JUnit4, delegates to our own RunListener
-
Nested Class Summary
Nested classes/interfaces inherited from class org.junit.runner.notification.RunListener
org.junit.runner.notification.RunListener.ThreadSafe -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final org.apache.maven.surefire.report.RunListener -
Constructor Summary
ConstructorsConstructorDescriptionJUnit4RunListener(org.apache.maven.surefire.report.RunListener reporter) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionprotected org.apache.maven.surefire.report.SimpleReportEntrycreateReportEntry(org.junit.runner.Description description) protected org.apache.maven.surefire.report.StackTraceWritercreateStackTraceWriter(org.junit.runner.notification.Failure failure) protected StringextractDescriptionClassName(org.junit.runner.Description description) protected StringextractDescriptionMethodName(org.junit.runner.Description description) static voidrethrowAnyTestMechanismFailures(org.junit.runner.Result run) voidtestAssumptionFailure(org.junit.runner.notification.Failure failure) voidDelegates toRunListener.testExecutionSkippedByUser().voidtestFailure(org.junit.runner.notification.Failure failure) Called when a specific test has failed.voidtestFinished(org.junit.runner.Description description) Called after a specific test has finished.voidtestIgnored(org.junit.runner.Description description) Called when a specific test has been skipped (for whatever reason).voidtestStarted(org.junit.runner.Description description) Called when a specific test has started.Methods inherited from class org.junit.runner.notification.RunListener
testRunFinished, testRunStarted, testSuiteFinished, testSuiteStarted
-
Field Details
-
reporter
protected final org.apache.maven.surefire.report.RunListener reporter
-
-
Constructor Details
-
JUnit4RunListener
public JUnit4RunListener(org.apache.maven.surefire.report.RunListener reporter) Constructor.- Parameters:
reporter- the reporter to log testing events to
-
-
Method Details
-
testIgnored
Called when a specific test has been skipped (for whatever reason).- Overrides:
testIgnoredin classorg.junit.runner.notification.RunListener- Throws:
Exception- See Also:
-
RunListener.testIgnored(org.junit.runner.Description)
-
testStarted
Called when a specific test has started.- Overrides:
testStartedin classorg.junit.runner.notification.RunListener- Throws:
Exception- See Also:
-
RunListener.testStarted(org.junit.runner.Description)
-
testFailure
Called when a specific test has failed.- Overrides:
testFailurein classorg.junit.runner.notification.RunListener- Throws:
Exception- See Also:
-
RunListener.testFailure(org.junit.runner.notification.Failure)
-
testAssumptionFailure
public void testAssumptionFailure(org.junit.runner.notification.Failure failure) - Overrides:
testAssumptionFailurein classorg.junit.runner.notification.RunListener
-
testFinished
Called after a specific test has finished.- Overrides:
testFinishedin classorg.junit.runner.notification.RunListener- Throws:
Exception- See Also:
-
RunListener.testFinished(org.junit.runner.Description)
-
testExecutionSkippedByUser
public void testExecutionSkippedByUser()Delegates toRunListener.testExecutionSkippedByUser(). -
createStackTraceWriter
protected org.apache.maven.surefire.report.StackTraceWriter createStackTraceWriter(org.junit.runner.notification.Failure failure) -
createReportEntry
protected org.apache.maven.surefire.report.SimpleReportEntry createReportEntry(org.junit.runner.Description description) -
extractDescriptionClassName
-
extractDescriptionMethodName
-
rethrowAnyTestMechanismFailures
public static void rethrowAnyTestMechanismFailures(org.junit.runner.Result run) throws org.apache.maven.surefire.testset.TestSetFailedException - Throws:
org.apache.maven.surefire.testset.TestSetFailedException
-