org.apache.maven.surefire.junitcore
Class ConcurrentRunListener

java.lang.Object
  extended by org.apache.maven.surefire.junitcore.ConcurrentRunListener
All Implemented Interfaces:
ConsoleOutputReceiver, RunListener
Direct Known Subclasses:
ClassesParallelRunListener, MethodsParallelRunListener

public abstract class ConcurrentRunListener
extends Object
implements RunListener, ConsoleOutputReceiver

Handles responses from concurrent junit

Stuff to remember about JUnit threading: parallel=classes; beforeClass/afterClass, constructor and all tests method run on same thread parallel=methods; beforeClass/afterClass run on main thread, constructor + each test method run on same thread parallel=both; same as parallel=methods

Author:
Kristian Rosenvold
See Also:
for details about regular junit run listening

Method Summary
protected abstract  void checkIfTestSetCanBeReported(TestSet testSetForTest)
           
static ConcurrentRunListener createInstance(Map<String,TestSet> classMethodCounts, ReporterFactory reporterManagerFactory, boolean parallelClasses, boolean parallelBoth, ConsoleLogger consoleLogger)
           
 void testAssumptionFailure(ReportEntry failure)
           
 void testError(ReportEntry failure)
           
 void testFailed(ReportEntry failure)
           
 void testSetCompleted(ReportEntry result)
           
 void testSetStarting(ReportEntry description)
           
 void testSkipped(ReportEntry description)
           
 void testStarting(ReportEntry description)
           
 void testSucceeded(ReportEntry report)
           
 void writeTestOutput(byte[] buf, int off, int len, boolean stdout)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

testSetStarting

public void testSetStarting(ReportEntry description)
Specified by:
testSetStarting in interface RunListener

testSetCompleted

public void testSetCompleted(ReportEntry result)
Specified by:
testSetCompleted in interface RunListener

testFailed

public void testFailed(ReportEntry failure)
Specified by:
testFailed in interface RunListener

testError

public void testError(ReportEntry failure)
Specified by:
testError in interface RunListener

testSkipped

public void testSkipped(ReportEntry description)
Specified by:
testSkipped in interface RunListener

testAssumptionFailure

public void testAssumptionFailure(ReportEntry failure)
Specified by:
testAssumptionFailure in interface RunListener

testStarting

public void testStarting(ReportEntry description)
Specified by:
testStarting in interface RunListener

testSucceeded

public void testSucceeded(ReportEntry report)
Specified by:
testSucceeded in interface RunListener

checkIfTestSetCanBeReported

protected abstract void checkIfTestSetCanBeReported(TestSet testSetForTest)

createInstance

public static ConcurrentRunListener createInstance(Map<String,TestSet> classMethodCounts,
                                                   ReporterFactory reporterManagerFactory,
                                                   boolean parallelClasses,
                                                   boolean parallelBoth,
                                                   ConsoleLogger consoleLogger)
                                            throws TestSetFailedException
Throws:
TestSetFailedException

writeTestOutput

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


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