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>
classMethodCounts
Deprecated.private ConsoleLogger
logger
Deprecated.private java.lang.ThreadLocal<TestReportListener<TestOutputReportEntry>>
reporterManagerThreadLocal
Deprecated.private boolean
reportImmediately
Deprecated.
-
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 void
checkIfTestSetCanBeReported(TestSet testSetForTest)
Deprecated.static ConcurrentRunListener
createInstance(java.util.Map<java.lang.String,TestSet> classMethodCounts, ReporterFactory reporterFactory, boolean parallelClasses, boolean parallelBoth)
Deprecated.void
debug(java.lang.String message)
Deprecated.void
error(java.lang.String message)
Deprecated.void
error(java.lang.String message, java.lang.Throwable t)
Deprecated.Simply delegates toerror( toString( t, message ) )
.void
error(java.lang.Throwable t)
Deprecated.Simply delegates to methoderror(null, Throwable)
.private TestMethod
getOrCreateThreadAttachedTestMethod(ReportEntry description)
Deprecated.(package private) TestReportListener<TestOutputReportEntry>
getRunListener()
Deprecated.private TestSet
getTestSet(ReportEntry description)
Deprecated.void
info(java.lang.String message)
Deprecated.boolean
isDebugEnabled()
Deprecated.boolean
isErrorEnabled()
Deprecated.boolean
isInfoEnabled()
Deprecated.boolean
isWarnEnabled()
Deprecated.void
testAssumptionFailure(ReportEntry failure)
Deprecated.Event fired when a test assumption failure was encountered.void
testError(ReportEntry failure)
Deprecated.Event fired when a test ended with an error (non anticipated problem)void
testExecutionSkippedByUser()
Deprecated.Event fired skipping an execution of remaining test-set in other fork(s); or does nothing if no forks.void
testFailed(ReportEntry failure)
Deprecated.Event fired when a test ended with a failure (anticipated problem)void
testSetCompleted(TestSetReportEntry result)
Deprecated.Indicates end of a given test-setvoid
testSetStarting(TestSetReportEntry description)
Deprecated.Indicates the start of a given test-setvoid
testSkipped(ReportEntry description)
Deprecated.Event fired when a test is skippedvoid
testStarting(ReportEntry description)
Deprecated.Event fired when a test is about to startvoid
testSucceeded(ReportEntry report)
Deprecated.Event fired when a test ended successfullyvoid
warning(java.lang.String message)
Deprecated.void
writeTestOutput(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:RunListener
Indicates the start of a given test-set- Specified by:
testSetStarting
in interfaceRunListener
- Parameters:
description
- the report entry describing the testset
-
testSetCompleted
public void testSetCompleted(TestSetReportEntry result)
Deprecated.Description copied from interface:RunListener
Indicates end of a given test-set- Specified by:
testSetCompleted
in interfaceRunListener
- Parameters:
result
- the report entry describing the testset
-
testFailed
public void testFailed(ReportEntry failure)
Deprecated.Description copied from interface:RunListener
Event fired when a test ended with a failure (anticipated problem)- Specified by:
testFailed
in interfaceRunListener
- Parameters:
failure
- The report entry to log for
-
testError
public void testError(ReportEntry failure)
Deprecated.Description copied from interface:RunListener
Event fired when a test ended with an error (non anticipated problem)- Specified by:
testError
in interfaceRunListener
- Parameters:
failure
- The report entry to log for
-
testSkipped
public void testSkipped(ReportEntry description)
Deprecated.Description copied from interface:RunListener
Event fired when a test is skipped- Specified by:
testSkipped
in interfaceRunListener
- Parameters:
description
- The report entry to log for
-
testExecutionSkippedByUser
public void testExecutionSkippedByUser()
Deprecated.Description copied from interface:RunListener
Event 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:
testExecutionSkippedByUser
in interfaceRunListener
-
testAssumptionFailure
public void testAssumptionFailure(ReportEntry failure)
Deprecated.Description copied from interface:RunListener
Event fired when a test assumption failure was encountered. An assumption failure indicates that the test is not relevant- Specified by:
testAssumptionFailure
in interfaceRunListener
- Parameters:
failure
- The report entry to log for
-
testStarting
public void testStarting(ReportEntry description)
Deprecated.Description copied from interface:RunListener
Event fired when a test is about to start- Specified by:
testStarting
in interfaceRunListener
- Parameters:
description
- The report entry to log for
-
testSucceeded
public void testSucceeded(ReportEntry report)
Deprecated.Description copied from interface:RunListener
Event fired when a test ended successfully- Specified by:
testSucceeded
in 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:TestOutputReceiver
Forwards process output from the running test-case into the reporting system- Specified by:
writeTestOutput
in interfaceTestOutputReceiver<TestOutputReportEntry>
- Parameters:
reportEntry
- wraps test output with descriptive information of the output
-
isDebugEnabled
public boolean isDebugEnabled()
Deprecated.- Specified by:
isDebugEnabled
in interfaceConsoleLogger
-
debug
public void debug(java.lang.String message)
Deprecated.- Specified by:
debug
in interfaceConsoleLogger
-
isInfoEnabled
public boolean isInfoEnabled()
Deprecated.- Specified by:
isInfoEnabled
in interfaceConsoleLogger
-
info
public void info(java.lang.String message)
Deprecated.- Specified by:
info
in interfaceConsoleLogger
-
isWarnEnabled
public boolean isWarnEnabled()
Deprecated.- Specified by:
isWarnEnabled
in interfaceConsoleLogger
-
warning
public void warning(java.lang.String message)
Deprecated.- Specified by:
warning
in interfaceConsoleLogger
-
isErrorEnabled
public boolean isErrorEnabled()
Deprecated.- Specified by:
isErrorEnabled
in interfaceConsoleLogger
-
error
public void error(java.lang.String message)
Deprecated.- Specified by:
error
in interfaceConsoleLogger
- Parameters:
message
- message to log
-
error
public void error(java.lang.String message, java.lang.Throwable t)
Deprecated.Description copied from interface:ConsoleLogger
Simply delegates toerror( toString( t, message ) )
.- Specified by:
error
in 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:ConsoleLogger
Simply delegates to methoderror(null, Throwable)
.- Specified by:
error
in interfaceConsoleLogger
- Parameters:
t
- exception, message and trace to log
-
-