Class ConcurrentRunListener
- java.lang.Object
-
- org.apache.maven.surefire.junitcore.ConcurrentRunListener
-
- All Implemented Interfaces:
ConsoleLogger,RunListener,TestOutputReceiver<TestOutputReportEntry>,TestReportListener<TestOutputReportEntry>
- Direct Known Subclasses:
ClassesParallelRunListener,MethodsParallelRunListener
@Deprecated abstract class ConcurrentRunListener extends java.lang.Object implements TestReportListener<TestOutputReportEntry>
Deprecated.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
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.Map<java.lang.String,TestSet>classMethodCountsDeprecated.private ConsoleLoggerloggerDeprecated.private java.lang.ThreadLocal<TestReportListener<TestOutputReportEntry>>reporterManagerThreadLocalDeprecated.private booleanreportImmediatelyDeprecated.
-
Constructor Summary
Constructors Constructor Description ConcurrentRunListener(ReporterFactory reporterFactory, boolean reportImmediately, java.util.Map<java.lang.String,TestSet> classMethodCounts)Deprecated.
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Deprecated Methods Modifier and Type Method Description protected abstract voidcheckIfTestSetCanBeReported(TestSet testSetForTest)Deprecated.static ConcurrentRunListenercreateInstance(java.util.Map<java.lang.String,TestSet> classMethodCounts, ReporterFactory reporterFactory, boolean parallelClasses, boolean parallelBoth)Deprecated.voiddebug(java.lang.String message)Deprecated.voiderror(java.lang.String message)Deprecated.voiderror(java.lang.String message, java.lang.Throwable t)Deprecated.Simply delegates toerror( toString( t, message ) ).voiderror(java.lang.Throwable t)Deprecated.Simply delegates to methoderror(null, Throwable).private TestMethodgetOrCreateThreadAttachedTestMethod(ReportEntry description)Deprecated.(package private) TestReportListener<TestOutputReportEntry>getRunListener()Deprecated.private TestSetgetTestSet(ReportEntry description)Deprecated.voidinfo(java.lang.String message)Deprecated.booleanisDebugEnabled()Deprecated.booleanisErrorEnabled()Deprecated.booleanisInfoEnabled()Deprecated.booleanisWarnEnabled()Deprecated.voidtestAssumptionFailure(ReportEntry failure)Deprecated.Event fired when a test assumption failure was encountered.voidtestError(ReportEntry failure)Deprecated.Event fired when a test ended with an error (non anticipated problem)voidtestExecutionSkippedByUser()Deprecated.Event fired skipping an execution of remaining test-set in other fork(s); or does nothing if no forks.voidtestFailed(ReportEntry failure)Deprecated.Event fired when a test ended with a failure (anticipated problem)voidtestSetCompleted(TestSetReportEntry result)Deprecated.Indicates end of a given test-setvoidtestSetStarting(TestSetReportEntry description)Deprecated.Indicates the start of a given test-setvoidtestSkipped(ReportEntry description)Deprecated.Event fired when a test is skippedvoidtestStarting(ReportEntry description)Deprecated.Event fired when a test is about to startvoidtestSucceeded(ReportEntry report)Deprecated.Event fired when a test ended successfullyvoidwarning(java.lang.String message)Deprecated.voidwriteTestOutput(TestOutputReportEntry reportEntry)Deprecated.Forwards process output from the running test-case into the reporting system
-
-
-
Field Detail
-
classMethodCounts
private final java.util.Map<java.lang.String,TestSet> classMethodCounts
Deprecated.
-
reporterManagerThreadLocal
private final java.lang.ThreadLocal<TestReportListener<TestOutputReportEntry>> reporterManagerThreadLocal
Deprecated.
-
reportImmediately
private final boolean reportImmediately
Deprecated.
-
logger
private final ConsoleLogger logger
Deprecated.
-
-
Constructor Detail
-
ConcurrentRunListener
ConcurrentRunListener(ReporterFactory reporterFactory, boolean reportImmediately, java.util.Map<java.lang.String,TestSet> classMethodCounts)
Deprecated.
-
-
Method Detail
-
testSetStarting
public void testSetStarting(TestSetReportEntry description)
Deprecated.Description copied from interface:RunListenerIndicates the start of a given test-set- Specified by:
testSetStartingin interfaceRunListener- Parameters:
description- the report entry describing the testset
-
testSetCompleted
public void testSetCompleted(TestSetReportEntry result)
Deprecated.Description copied from interface:RunListenerIndicates end of a given test-set- Specified by:
testSetCompletedin interfaceRunListener- Parameters:
result- the report entry describing the testset
-
testFailed
public void testFailed(ReportEntry failure)
Deprecated.Description copied from interface:RunListenerEvent fired when a test ended with a failure (anticipated problem)- Specified by:
testFailedin interfaceRunListener- Parameters:
failure- The report entry to log for
-
testError
public void testError(ReportEntry failure)
Deprecated.Description copied from interface:RunListenerEvent fired when a test ended with an error (non anticipated problem)- Specified by:
testErrorin interfaceRunListener- Parameters:
failure- The report entry to log for
-
testSkipped
public void testSkipped(ReportEntry description)
Deprecated.Description copied from interface:RunListenerEvent fired when a test is skipped- Specified by:
testSkippedin interfaceRunListener- Parameters:
description- The report entry to log for
-
testExecutionSkippedByUser
public void testExecutionSkippedByUser()
Deprecated.Description copied from interface:RunListenerEvent fired skipping an execution of remaining test-set in other fork(s); or does nothing if no forks. The method is called bySurefireProvider.(The event is fired after the Nth test failed to signal skipping the rest of test-set.)
- Specified by:
testExecutionSkippedByUserin interfaceRunListener
-
testAssumptionFailure
public void testAssumptionFailure(ReportEntry failure)
Deprecated.Description copied from interface:RunListenerEvent fired when a test assumption failure was encountered. An assumption failure indicates that the test is not relevant- Specified by:
testAssumptionFailurein interfaceRunListener- Parameters:
failure- The report entry to log for
-
testStarting
public void testStarting(ReportEntry description)
Deprecated.Description copied from interface:RunListenerEvent fired when a test is about to start- Specified by:
testStartingin interfaceRunListener- Parameters:
description- The report entry to log for
-
testSucceeded
public void testSucceeded(ReportEntry report)
Deprecated.Description copied from interface:RunListenerEvent fired when a test ended successfully- Specified by:
testSucceededin interfaceRunListener- Parameters:
report- The report entry to log for
-
getOrCreateThreadAttachedTestMethod
private TestMethod getOrCreateThreadAttachedTestMethod(ReportEntry description)
Deprecated.
-
checkIfTestSetCanBeReported
protected abstract void checkIfTestSetCanBeReported(TestSet testSetForTest)
Deprecated.
-
getTestSet
private TestSet getTestSet(ReportEntry description)
Deprecated.
-
getRunListener
final TestReportListener<TestOutputReportEntry> getRunListener()
Deprecated.
-
createInstance
public static ConcurrentRunListener createInstance(java.util.Map<java.lang.String,TestSet> classMethodCounts, ReporterFactory reporterFactory, boolean parallelClasses, boolean parallelBoth)
Deprecated.
-
writeTestOutput
public void writeTestOutput(TestOutputReportEntry reportEntry)
Deprecated.Description copied from interface:TestOutputReceiverForwards process output from the running test-case into the reporting system- Specified by:
writeTestOutputin interfaceTestOutputReceiver<TestOutputReportEntry>- Parameters:
reportEntry- wraps test output with descriptive information of the output
-
isDebugEnabled
public boolean isDebugEnabled()
Deprecated.- Specified by:
isDebugEnabledin interfaceConsoleLogger
-
debug
public void debug(java.lang.String message)
Deprecated.- Specified by:
debugin interfaceConsoleLogger
-
isInfoEnabled
public boolean isInfoEnabled()
Deprecated.- Specified by:
isInfoEnabledin interfaceConsoleLogger
-
info
public void info(java.lang.String message)
Deprecated.- Specified by:
infoin interfaceConsoleLogger
-
isWarnEnabled
public boolean isWarnEnabled()
Deprecated.- Specified by:
isWarnEnabledin interfaceConsoleLogger
-
warning
public void warning(java.lang.String message)
Deprecated.- Specified by:
warningin interfaceConsoleLogger
-
isErrorEnabled
public boolean isErrorEnabled()
Deprecated.- Specified by:
isErrorEnabledin interfaceConsoleLogger
-
error
public void error(java.lang.String message)
Deprecated.- Specified by:
errorin interfaceConsoleLogger- Parameters:
message- message to log
-
error
public void error(java.lang.String message, java.lang.Throwable t)Deprecated.Description copied from interface:ConsoleLoggerSimply delegates toerror( toString( t, message ) ).- Specified by:
errorin interfaceConsoleLogger- Parameters:
message- message to logt- exception, message and trace to log
-
error
public void error(java.lang.Throwable t)
Deprecated.Description copied from interface:ConsoleLoggerSimply delegates to methoderror(null, Throwable).- Specified by:
errorin interfaceConsoleLogger- Parameters:
t- exception, message and trace to log
-
-