Class NonConcurrentRunListener
java.lang.Object
org.junit.runner.notification.RunListener
org.apache.maven.surefire.common.junit4.JUnit4RunListener
org.apache.maven.surefire.junitcore.NonConcurrentRunListener
- All Implemented Interfaces:
org.apache.maven.surefire.report.ConsoleOutputReceiver
public class NonConcurrentRunListener
extends org.apache.maven.surefire.common.junit4.JUnit4RunListener
implements org.apache.maven.surefire.report.ConsoleOutputReceiver
A class to be used when there is no JUnit parallelism (methods or/and class). This allow to workaround JUnit
limitation a la Junit4 provider. Specifically, we can redirect properly the output even if we don't have class
demarcation in JUnit. It works when if there is a JVM instance per test run, i.e. with forkMode=always or perthread.
-
Nested Class Summary
Nested classes/interfaces inherited from class org.junit.runner.notification.RunListener
org.junit.runner.notification.RunListener.ThreadSafe -
Field Summary
Fields inherited from class org.apache.maven.surefire.common.junit4.JUnit4RunListener
reporter -
Constructor Summary
ConstructorsConstructorDescriptionNonConcurrentRunListener(org.apache.maven.surefire.report.RunListener reporter) -
Method Summary
Modifier and TypeMethodDescriptionprotected org.apache.maven.surefire.report.SimpleReportEntrycreateReportEntry(org.junit.runner.Description description) protected StringextractDescriptionClassName(org.junit.runner.Description description) protected StringextractDescriptionMethodName(org.junit.runner.Description description) 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) voidtestRunStarted(org.junit.runner.Description description) voidtestStarted(org.junit.runner.Description description) voidwriteTestOutput(byte[] buf, int off, int len, boolean stdout) Methods inherited from class org.apache.maven.surefire.common.junit4.JUnit4RunListener
createStackTraceWriter, rethrowAnyTestMechanismFailures, testExecutionSkippedByUserMethods inherited from class org.junit.runner.notification.RunListener
testSuiteFinished, testSuiteStarted
-
Constructor Details
-
NonConcurrentRunListener
public NonConcurrentRunListener(org.apache.maven.surefire.report.RunListener reporter) throws org.apache.maven.surefire.testset.TestSetFailedException - Throws:
org.apache.maven.surefire.testset.TestSetFailedException
-
-
Method Details
-
writeTestOutput
public void writeTestOutput(byte[] buf, int off, int len, boolean stdout) - Specified by:
writeTestOutputin interfaceorg.apache.maven.surefire.report.ConsoleOutputReceiver
-
createReportEntry
protected org.apache.maven.surefire.report.SimpleReportEntry createReportEntry(org.junit.runner.Description description) - Overrides:
createReportEntryin classorg.apache.maven.surefire.common.junit4.JUnit4RunListener
-
extractDescriptionClassName
- Overrides:
extractDescriptionClassNamein classorg.apache.maven.surefire.common.junit4.JUnit4RunListener
-
extractDescriptionMethodName
- Overrides:
extractDescriptionMethodNamein classorg.apache.maven.surefire.common.junit4.JUnit4RunListener
-
testStarted
- Overrides:
testStartedin classorg.apache.maven.surefire.common.junit4.JUnit4RunListener- Throws:
Exception
-
testFinished
- Overrides:
testFinishedin classorg.apache.maven.surefire.common.junit4.JUnit4RunListener- Throws:
Exception
-
testIgnored
- Overrides:
testIgnoredin classorg.apache.maven.surefire.common.junit4.JUnit4RunListener- Throws:
Exception
-
testFailure
- Overrides:
testFailurein classorg.apache.maven.surefire.common.junit4.JUnit4RunListener- Throws:
Exception
-
testAssumptionFailure
public void testAssumptionFailure(org.junit.runner.notification.Failure failure) - Overrides:
testAssumptionFailurein classorg.apache.maven.surefire.common.junit4.JUnit4RunListener
-
testRunStarted
- Overrides:
testRunStartedin classorg.junit.runner.notification.RunListener- Throws:
Exception
-
testRunFinished
- Overrides:
testRunFinishedin classorg.junit.runner.notification.RunListener- Throws:
Exception
-