public class JUnit4RunListener extends org.junit.runner.notification.RunListener implements TestOutputReceiver<OutputReportEntry>, RunModeSetter
Modifier and Type | Field and Description |
---|---|
protected ClassMethodIndexer |
classMethodIndexer |
protected TestReportListener<TestOutputReportEntry> |
reporter |
Constructor and Description |
---|
JUnit4RunListener(TestReportListener<TestOutputReportEntry> reporter)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
protected SimpleReportEntry |
createReportEntry(org.junit.runner.Description description) |
protected StackTraceWriter |
createStackTraceWriter(org.junit.runner.notification.Failure failure) |
org.apache.maven.plugin.surefire.log.api.ConsoleLogger |
getConsoleLogger() |
protected RunMode |
getRunMode() |
static void |
rethrowAnyTestMechanismFailures(org.junit.runner.Result run) |
void |
setRunMode(RunMode runMode) |
void |
testAssumptionFailure(org.junit.runner.notification.Failure failure) |
void |
testExecutionSkippedByUser()
Delegates to
RunListener.testExecutionSkippedByUser() . |
void |
testFailure(org.junit.runner.notification.Failure failure)
Called when a specific test has failed.
|
void |
testFinished(org.junit.runner.Description description)
Called after a specific test has finished.
|
void |
testIgnored(org.junit.runner.Description description)
Called when a specific test has been skipped (for whatever reason).
|
void |
testStarted(org.junit.runner.Description description)
Called when a specific test has started.
|
void |
writeTestOutput(OutputReportEntry reportEntry) |
protected final ClassMethodIndexer classMethodIndexer
protected final TestReportListener<TestOutputReportEntry> reporter
public JUnit4RunListener(TestReportListener<TestOutputReportEntry> reporter)
reporter
- the reporter to log testing events topublic final org.apache.maven.plugin.surefire.log.api.ConsoleLogger getConsoleLogger()
public void setRunMode(RunMode runMode)
setRunMode
in interface RunModeSetter
protected final RunMode getRunMode()
public void testIgnored(org.junit.runner.Description description) throws Exception
testIgnored
in class org.junit.runner.notification.RunListener
Exception
RunListener.testIgnored(org.junit.runner.Description)
public void testStarted(org.junit.runner.Description description) throws Exception
testStarted
in class org.junit.runner.notification.RunListener
Exception
RunListener.testStarted(org.junit.runner.Description)
public void testFailure(org.junit.runner.notification.Failure failure) throws Exception
testFailure
in class org.junit.runner.notification.RunListener
Exception
RunListener.testFailure(org.junit.runner.notification.Failure)
public void testAssumptionFailure(org.junit.runner.notification.Failure failure)
public void testFinished(org.junit.runner.Description description) throws Exception
testFinished
in class org.junit.runner.notification.RunListener
Exception
RunListener.testFinished(org.junit.runner.Description)
public void testExecutionSkippedByUser()
RunListener.testExecutionSkippedByUser()
.protected StackTraceWriter createStackTraceWriter(org.junit.runner.notification.Failure failure)
protected SimpleReportEntry createReportEntry(org.junit.runner.Description description)
public static void rethrowAnyTestMechanismFailures(org.junit.runner.Result run) throws TestSetFailedException
TestSetFailedException
public void writeTestOutput(OutputReportEntry reportEntry)
writeTestOutput
in interface TestOutputReceiver<OutputReportEntry>
Copyright © 2004–2024 The Apache Software Foundation. All rights reserved.