org.apache.maven.surefire.junitcore
Class NonConcurrentRunListener

java.lang.Object
  extended by org.junit.runner.notification.RunListener
      extended by org.apache.maven.surefire.common.junit4.JUnit4RunListener
          extended by org.apache.maven.surefire.junitcore.NonConcurrentRunListener
All Implemented Interfaces:
ConsoleOutputReceiver

public class NonConcurrentRunListener
extends JUnit4RunListener
implements 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.


Field Summary
 
Fields inherited from class org.apache.maven.surefire.common.junit4.JUnit4RunListener
reporter
 
Constructor Summary
NonConcurrentRunListener(RunListener reporter)
           
 
Method Summary
protected  SimpleReportEntry createReportEntry(Description description)
           
protected  SimpleReportEntry createReportEntryForTestSet(Description description)
           
 void testAssumptionFailure(Failure failure)
           
 void testFailure(Failure failure)
           
 void testFinished(Description description)
           
 void testIgnored(Description description)
           
 void testRunFinished(Result result)
           
 void testRunStarted(Description description)
           
 void testStarted(Description description)
           
 void writeTestOutput(byte[] buf, int off, int len, boolean stdout)
           
 
Methods inherited from class org.apache.maven.surefire.common.junit4.JUnit4RunListener
createStackTraceWriter, extractClassName, getClassName, rethrowAnyTestMechanismFailures
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NonConcurrentRunListener

public NonConcurrentRunListener(RunListener reporter)
                         throws TestSetFailedException
Throws:
TestSetFailedException
Method Detail

writeTestOutput

public void writeTestOutput(byte[] buf,
                            int off,
                            int len,
                            boolean stdout)
Specified by:
writeTestOutput in interface ConsoleOutputReceiver

createReportEntry

protected SimpleReportEntry createReportEntry(Description description)
Overrides:
createReportEntry in class JUnit4RunListener

createReportEntryForTestSet

protected SimpleReportEntry createReportEntryForTestSet(Description description)

testStarted

public void testStarted(Description description)
                 throws Exception
Overrides:
testStarted in class JUnit4RunListener
Throws:
Exception

testFinished

public void testFinished(Description description)
                  throws Exception
Overrides:
testFinished in class JUnit4RunListener
Throws:
Exception

testIgnored

public void testIgnored(Description description)
                 throws Exception
Overrides:
testIgnored in class JUnit4RunListener
Throws:
Exception

testFailure

public void testFailure(Failure failure)
                 throws Exception
Overrides:
testFailure in class JUnit4RunListener
Throws:
Exception

testAssumptionFailure

public void testAssumptionFailure(Failure failure)
Overrides:
testAssumptionFailure in class JUnit4RunListener

testRunStarted

public void testRunStarted(Description description)
                    throws Exception
Overrides:
testRunStarted in class RunListener
Throws:
Exception

testRunFinished

public void testRunFinished(Result result)
                     throws Exception
Overrides:
testRunFinished in class RunListener
Throws:
Exception


Copyright © 2004-2013 The Apache Software Foundation. All Rights Reserved.