org.apache.maven.surefire.junitcore
Class ConcurrentReporterManager

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

public abstract class ConcurrentReporterManager
extends java.lang.Object
implements Reporter

Author:
Kristian Rosenvold

Method Summary
protected abstract  void checkIfTestSetCanBeReported(TestSet testSetForTest)
           
static ConcurrentReporterManager createInstance(java.util.Map<java.lang.String,TestSet> classMethodCounts, ReporterFactory reporterManagerFactory, ReporterConfiguration reporterConfiguration, boolean parallelClasses, boolean parallelBoth)
           
 void reset()
          Restores the instance of the reporter, making the instance re-usable for a subsequent run in the same thread.
 void testAssumptionFailure(ReportEntry failure)
          Event fired when a test assumption failure was encountered.
 void testError(ReportEntry failure)
          Event fired when a test ended with an error (non anticipated problem)
 void testError(ReportEntry failure, java.lang.String out, java.lang.String err)
          Event fired when a test ended with an error (non anticipated problem)
 void testFailed(ReportEntry failure)
          Event fired when a test ended with a failure (anticipated problem)
 void testFailed(ReportEntry report, java.lang.String stdOut, java.lang.String stdErr)
          Event fired when a test ended with a failure (anticipated problem)
 void testSetCompleted(ReportEntry result)
          Indicates end of a given test-set
 void testSetStarting(ReportEntry description)
          Indicates the start of a given test-set
 void testSkipped(ReportEntry description)
           
 void testStarting(ReportEntry description)
          Event fired when a test is about to start
 void testSucceeded(ReportEntry report)
          Event fired when a test ended successfully
 void writeDetailMessage(java.lang.String message)
          Writes a detailed message that will not necessarily be displayed in all channels.
 void writeFooter(java.lang.String footer)
           
 void writeMessage(java.lang.String message)
          Writes a message that will be displayed in all free-text format reporters.
 
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)
Description copied from interface: Reporter
Indicates the start of a given test-set

Specified by:
testSetStarting in interface Reporter
Parameters:
description - the report entry describing the testset

testSetCompleted

public void testSetCompleted(ReportEntry result)
                      throws ReporterException
Description copied from interface: Reporter
Indicates end of a given test-set

Specified by:
testSetCompleted in interface Reporter
Parameters:
result - the report entry describing the testset
Throws:
ReporterException - When reporting fails

testFailed

public void testFailed(ReportEntry failure)
Description copied from interface: Reporter
Event fired when a test ended with a failure (anticipated problem)

Specified by:
testFailed in interface Reporter
Parameters:
failure - The report entry to log for

testError

public void testError(ReportEntry failure)
Description copied from interface: Reporter
Event fired when a test ended with an error (non anticipated problem)

Specified by:
testError in interface Reporter
Parameters:
failure - The report entry to log for

testSkipped

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

testAssumptionFailure

public void testAssumptionFailure(ReportEntry failure)
Description copied from interface: Reporter
Event fired when a test assumption failure was encountered. An assumption failure indicates that the test is not relevant

Specified by:
testAssumptionFailure in interface Reporter
Parameters:
failure - The report entry to log for

testStarting

public void testStarting(ReportEntry description)
Description copied from interface: Reporter
Event fired when a test is about to start

Specified by:
testStarting in interface Reporter
Parameters:
description - The report entry to log for

testSucceeded

public void testSucceeded(ReportEntry report)
Description copied from interface: Reporter
Event fired when a test ended successfully

Specified by:
testSucceeded in interface Reporter
Parameters:
report - The report entry to log for

checkIfTestSetCanBeReported

protected abstract void checkIfTestSetCanBeReported(TestSet testSetForTest)

writeFooter

public void writeFooter(java.lang.String footer)
Specified by:
writeFooter in interface Reporter

writeMessage

public void writeMessage(java.lang.String message)
Description copied from interface: Reporter
Writes a message that will be displayed in all free-text format reporters. These messages will be output regardless, as opposed to #writeDetailMessage, which is controlled by reportFormat.

Specified by:
writeMessage in interface Reporter
Parameters:
message - The message to write.

reset

public void reset()
Description copied from interface: Reporter
Restores the instance of the reporter, making the instance re-usable for a subsequent run in the same thread.

Specified by:
reset in interface Reporter

testFailed

public void testFailed(ReportEntry report,
                       java.lang.String stdOut,
                       java.lang.String stdErr)
Description copied from interface: Reporter
Event fired when a test ended with a failure (anticipated problem)

Specified by:
testFailed in interface Reporter
Parameters:
report - The report entry to log for
stdOut - standard output from the test case
stdErr - error output from the test case

writeDetailMessage

public void writeDetailMessage(java.lang.String message)
Description copied from interface: Reporter
Writes a detailed message that will not necessarily be displayed in all channels. This is controlled by reportFormat attribute on the plugin.

Specified by:
writeDetailMessage in interface Reporter
Parameters:
message - The message to write

testError

public void testError(ReportEntry failure,
                      java.lang.String out,
                      java.lang.String err)
Description copied from interface: Reporter
Event fired when a test ended with an error (non anticipated problem)

Specified by:
testError in interface Reporter
Parameters:
failure - The report entry to log for
out - standard output from the test case
err - error output from the test case

createInstance

public static ConcurrentReporterManager createInstance(java.util.Map<java.lang.String,TestSet> classMethodCounts,
                                                       ReporterFactory reporterManagerFactory,
                                                       ReporterConfiguration reporterConfiguration,
                                                       boolean parallelClasses,
                                                       boolean parallelBoth)
                                                throws TestSetFailedException
Throws:
TestSetFailedException


Copyright © 2004-2011 Apache Software Foundation. All Rights Reserved.