Package org.apache.maven.surefire.report

Examples of org.apache.maven.surefire.report.RunListener


            return;
        }

        this.options.put( "suitename", testsToRun.getLocatedClasses()[0].getName() );

        RunListener reporter = reporterManagerFactory.createReporter();
        ConsoleOutputCapture.startCapture( (ConsoleOutputReceiver) reporter );

        startTestSuite( reporter, this );

        TestNGExecutor.run( new Class[]{ (Class) testsToRun.iterator().next() }, this.testSourceDirectory, this.options,
View Full Code Here


            testNgReportsDirectory = new File( reportsDirectory, "testng-native-results" );
            junitReportsDirectory = new File( reportsDirectory, "testng-junit-results" );
        }

//        RunListener reporterManager = new SynchronizedReporterManager( reporterFactory.createReporter() );
        RunListener reporterManager = reporterFactory.createReporter();
        ConsoleOutputCapture.startCapture( (ConsoleOutputReceiver) reporterManager );
        startTestSuite( reporterManager, this );

        Class[] testClasses = (Class[]) testNgTestClasses.toArray( new Class[testNgTestClasses.size()] );
View Full Code Here

        if ( testSet == null )
        {
            throw new TestSetFailedException( "Unable to find test set '" + testSetName + "' in suite" );
        }

        RunListener reporter = reporterManagerFactory.createReporter();
        ConsoleOutputCapture.startCapture( (ConsoleOutputReceiver) reporter );

        startTestSuite( reporter, this );

        TestNGExecutor.run( new Class[]{ testSet.getTestClass() }, this.testSourceDirectory, this.options, this.version,
View Full Code Here

        upgradeCheck();

        final ReporterFactory reporterFactory = providerParameters.getReporterFactory();

        final RunListener reporter = reporterFactory.createReporter();

        ConsoleOutputCapture.startCapture( (ConsoleOutputReceiver) reporter );

        JUnit4RunListener jUnit4TestSetReporter = new JUnit4RunListener( reporter );
View Full Code Here

    {
        final StandardTestRun standardTestRun = new StandardTestRun();
        standardTestRun.run();

        reset();
        RunListener forkingReporter = createForkingRunListener( defaultChannel );

        TestSetMockReporterFactory providerReporterFactory = new TestSetMockReporterFactory();
        final Properties testVmSystemProperties = new Properties();
        ForkClient forkStreamClient = new ForkClient( providerReporterFactory, testVmSystemProperties );
View Full Code Here

        final StandardTestRun standardTestRun = new StandardTestRun();
        standardTestRun.run();

        reset();
        RunListener forkingReporter = createForkingRunListener( defaultChannel );

        ReportEntry reportEntry = createDefaultReportEntry();
        forkingReporter.testSetStarting( reportEntry );
        forkingReporter.testStarting( reportEntry );
        forkingReporter.testSucceeded( reportEntry );
        forkingReporter.testSetCompleted( reportEntry );

        TestSetMockReporterFactory providerReporterFactory = new TestSetMockReporterFactory();
        ForkClient forkStreamClient = new ForkClient( providerReporterFactory, new Properties() );

        forkStreamClient.consumeMultiLineContent( content.toString( "utf-8" ) );
View Full Code Here

        JUnitCoreParameters jUnitCoreParameters = new JUnitCoreParameters( junitProps );

        final Map<String, TestSet> testSetMap = new ConcurrentHashMap<String, TestSet>();

        RunListener listener =
            ConcurrentReporterManager.createInstance( testSetMap, reporterFactory, false, false, consoleLogger );

        TestsToRun testsToRun = new TestsToRun( Arrays.<Class<?>>asList( TestClassTest.class ) );

        org.junit.runner.notification.RunListener jUnit4RunListener = new JUnitCoreRunListener( listener, testSetMap );
View Full Code Here

        throws TestSetFailedException, ExecutionException
    {
        ReporterFactory reporterManagerFactory = FileReporterFactory.defaultNoXml();

        final HashMap<String, TestSet> classMethodCounts = new HashMap<String, TestSet>();
        RunListener reporter =
            ConcurrentReporterManager.createInstance( classMethodCounts, reporterManagerFactory, parallelClasses, false,
                                                      new DefaultConsoleReporter( System.out ) );
        ConsoleOutputCapture.startCapture( (ConsoleOutputReceiver) reporter );

        JUnitCoreRunListener runListener = new JUnitCoreRunListener( reporter, classMethodCounts );
View Full Code Here

        throws TestSetFailedException
    {
        ReporterFactory reporterFactory = createReporterFactory();
        HashMap<String, TestSet> classMethodCounts = new HashMap<String, TestSet>();
        final DefaultConsoleReporter defaultConsoleReporter = new DefaultConsoleReporter( System.out );
        RunListener reporter =
            new ClassesParallelRunListener( classMethodCounts, reporterFactory, defaultConsoleReporter );
        JUnitCoreRunListener runListener = new JUnitCoreRunListener( reporter, classMethodCounts );
        RunStatistics result = runClasses( reporterFactory, runListener, classes );
        assertReporter( result, success, ignored, failure, "classes" );
        classMethodCounts.clear();
View Full Code Here

        return testSetReporters.get( channelNumber );
    }

    private RunListener getOrCreateReporter( Integer channelNumber )
    {
        RunListener reporter = testSetReporters.get( channelNumber );
        if ( reporter == null )
        {
            reporter = defaultReporterFactory.createReporter();
            testSetReporters.put( channelNumber, reporter );
        }
View Full Code Here

TOP

Related Classes of org.apache.maven.surefire.report.RunListener

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.