Class ConcurrentRunListener

  • All Implemented Interfaces:
    org.apache.maven.surefire.report.ConsoleOutputReceiver, org.apache.maven.surefire.report.RunListener
    Direct Known Subclasses:
    ClassesParallelRunListener, MethodsParallelRunListener

    public abstract class ConcurrentRunListener
    extends java.lang.Object
    implements org.apache.maven.surefire.report.RunListener, org.apache.maven.surefire.report.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 Detail

      • testSetStarting

        public void testSetStarting​(org.apache.maven.surefire.report.TestSetReportEntry description)
        Specified by:
        testSetStarting in interface org.apache.maven.surefire.report.RunListener
      • testSetCompleted

        public void testSetCompleted​(org.apache.maven.surefire.report.TestSetReportEntry result)
        Specified by:
        testSetCompleted in interface org.apache.maven.surefire.report.RunListener
      • testFailed

        public void testFailed​(org.apache.maven.surefire.report.ReportEntry failure)
        Specified by:
        testFailed in interface org.apache.maven.surefire.report.RunListener
      • testError

        public void testError​(org.apache.maven.surefire.report.ReportEntry failure)
        Specified by:
        testError in interface org.apache.maven.surefire.report.RunListener
      • testSkipped

        public void testSkipped​(org.apache.maven.surefire.report.ReportEntry description)
        Specified by:
        testSkipped in interface org.apache.maven.surefire.report.RunListener
      • testExecutionSkippedByUser

        public void testExecutionSkippedByUser()
        Specified by:
        testExecutionSkippedByUser in interface org.apache.maven.surefire.report.RunListener
      • testAssumptionFailure

        public void testAssumptionFailure​(org.apache.maven.surefire.report.ReportEntry failure)
        Specified by:
        testAssumptionFailure in interface org.apache.maven.surefire.report.RunListener
      • testStarting

        public void testStarting​(org.apache.maven.surefire.report.ReportEntry description)
        Specified by:
        testStarting in interface org.apache.maven.surefire.report.RunListener
      • testSucceeded

        public void testSucceeded​(org.apache.maven.surefire.report.ReportEntry report)
        Specified by:
        testSucceeded in interface org.apache.maven.surefire.report.RunListener
      • checkIfTestSetCanBeReported

        protected abstract void checkIfTestSetCanBeReported​(TestSet testSetForTest)
      • createInstance

        public static ConcurrentRunListener createInstance​(java.util.Map<java.lang.String,​TestSet> classMethodCounts,
                                                           org.apache.maven.surefire.report.ReporterFactory reporterFactory,
                                                           boolean parallelClasses,
                                                           boolean parallelBoth,
                                                           org.apache.maven.surefire.report.ConsoleStream consoleStream)
                                                    throws org.apache.maven.surefire.testset.TestSetFailedException
        Throws:
        org.apache.maven.surefire.testset.TestSetFailedException
      • writeTestOutput

        public void writeTestOutput​(byte[] buf,
                                    int off,
                                    int len,
                                    boolean stdout)
        Specified by:
        writeTestOutput in interface org.apache.maven.surefire.report.ConsoleOutputReceiver