Package org.apache.maven.surefire.suite

Examples of org.apache.maven.surefire.suite.RunResult


                                                                  new ArrayBlockingQueue<Runnable>( 500 ) );

        try
        {
            // Ask to the executorService to run all tasks
            RunResult globalResult = new RunResult( 0, 0, 0, 0 );
            final Iterator suites = getSuitesIterator();
            while ( suites.hasNext() )
            {
                final Object testSet = suites.next();
                final ForkClient forkClient =
                    new ForkClient( fileReporterFactory, startupReportConfiguration.getTestVmSystemProperties() );
                Callable<RunResult> pf = new Callable<RunResult>()
                {
                    public RunResult call()
                        throws Exception
                    {
                        return fork( testSet, properties, forkClient, fileReporterFactory.getGlobalRunStatistics() );
                    }
                };
                results.add( executorService.submit( pf ) );

            }

            for ( Future<RunResult> result : results )
            {
                try
                {
                    RunResult cur = result.get();
                    if ( cur != null )
                    {
                        globalResult = globalResult.aggregate( cur );
                    }
                    else
View Full Code Here


        if ( forkConfiguration.isDebug() )
        {
            System.out.println( "Forking command line: " + cli );
        }

        RunResult runResult;

        try
        {
            final int timeout = forkedProcessTimeoutInSeconds > 0 ? forkedProcessTimeoutInSeconds : 0;
            final int result =
View Full Code Here

    }

    private void writeSummary( Summary summary )
        throws MojoFailureException
    {
        RunResult result = summary.getResultOfLastSuccessfulRun();
        SurefireHelper.reportExecution( this, result, getLog() );
    }
View Full Code Here

    private FailsafeSummary createFailsafeSummaryFromSummary( Summary summary )
    {
        FailsafeSummary failsafeSummary = new FailsafeSummary();
        if ( summary.isErrorFree() )
        {
            RunResult result = summary.getResultOfLastSuccessfulRun();
            if ( result != null )
            {
                failsafeSummary.setResult( result.getForkedProcessCode() );
            }
        }
        else
        {
            failsafeSummary.setResult( ProviderConfiguration.TESTS_FAILED_EXIT_CODE );
View Full Code Here

        return new ForkingRunListener( originalSystemOut, testSetChannelId++, isTrimstackTrace.booleanValue() );
    }

    public RunResult close()
    {
        return new RunResult( 17, 17, 17, 17 );
    }
View Full Code Here

        ForkConfiguration forkConfiguration = getForkConfiguration();
        summary.reportForkConfiguration( forkConfiguration );
        ClassLoaderConfiguration classLoaderConfiguration = getClassLoaderConfiguration( forkConfiguration );
        try
        {
            final RunResult result;
            if ( ForkConfiguration.FORK_NEVER.equals( forkConfiguration.getForkMode() ) )
            {
                InPluginVMSurefireStarter surefireStarter =
                    createInprocessStarter( provider, forkConfiguration, classLoaderConfiguration );
                result = surefireStarter.runSuitesInProcess();
View Full Code Here

        assertFalse( summary.isFailureOrTimeout() );
    }

    public void testSummaryReturnsFailureOrTimeOutStateOfLastRun()
    {
        RunResult resultWithoutFailure = new RunResult( 0, 0, 0, 0, false, false );
        RunResult resultWithFailure = new RunResult( 0, 0, 0, 0, true, true );
        summary.registerRunResult( resultWithoutFailure );
        summary.registerRunResult( resultWithFailure );
        assertTrue( summary.isFailureOrTimeout() );
    }
View Full Code Here

        assertNull( summary.getResultOfLastSuccessfulRun() );
    }

    public void testSummaryReturnsTheSecondOfTwoResult()
    {
        RunResult resultOne = new RunResult( 0, 0, 0, 0 );
        RunResult resultTwo = new RunResult( 0, 0, 0, 0 );
        summary.registerRunResult( resultOne );
        summary.registerRunResult( resultTwo );
        assertEquals( "Wrong exception.", resultTwo, summary.getResultOfLastSuccessfulRun() );
    }
View Full Code Here

            new ArrayList<org.junit.runner.notification.RunListener>();
        customRunListeners.add( 0, jUnit4RunListener );

        JUnitCoreWrapper.execute( testsToRun, jUnitCoreParameters, customRunListeners, null );

        RunResult result = reporterFactory.close();

        Assert.assertEquals( "JUnit should report correctly number of test ran(Finished)", 1,
                             result.getCompletedCount() );

    }
View Full Code Here

    public RunResult run( SurefireProperties effectiveSystemProperties, DefaultScanResult scanResult,
                          String requestedForkMode )
        throws SurefireBooterForkException, SurefireExecutionException
    {
        final RunResult result;
        try
        {
            Properties providerProperties = providerConfiguration.getProviderProperties();
            scanResult.writeTo( providerProperties );
            if ( ForkConfiguration.FORK_ONCE.equals( requestedForkMode ) )
View Full Code Here

TOP

Related Classes of org.apache.maven.surefire.suite.RunResult

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.