Package org.apache.maven.surefire.its.fixture

Examples of org.apache.maven.surefire.its.fixture.OutputValidator


    {

        final SurefireLauncher unpack = getUnpacked();
        final SurefireLauncher child = unpack.getSubProjectLauncher( "child" );
        //child.getTargetFile( "out.txt" ).delete();
        final OutputValidator outputValidator = child.forkNever().executeTest().assertTestSuiteResults( 1, 0, 0, 0 );
        verifyOutputDirectory( outputValidator );
    }
View Full Code Here


    }

    private OutputValidator getPreparedChild( SurefireLauncher unpack )
        throws VerificationException
    {
        final OutputValidator child = unpack.getSubProjectValidator( "child" );
        getOutFile( child ).delete();
        return child;
    }
View Full Code Here

    extends SurefireIntegrationTestCase
{
    public void testTestNgReport()
        throws Exception
    {
        final OutputValidator outputValidator =
            unpack( "/testng-simple" ).addSurefireReportGoal().executeCurrentGoals().verifyErrorFree( 1 );
        outputValidator.getSiteFile( "surefire-report.html" ).assertFileExists();
    }
View Full Code Here

    }

    public void testJUnit4RunListener()
        throws Exception
    {
        final OutputValidator outputValidator = unpack().addGoal( "-Dprovider=surefire-junit4" ).setJUnitVersion(
            "4.4" ).executeTest().verifyErrorFreeLog();
        assertResults( outputValidator );
        outputValidator.verifyTextInLog( "testRunStarted null" );
        outputValidator.verifyTextInLog( "testFinished simpleTest" );
        outputValidator.verifyTextInLog( "testRunFinished org.junit.runner.Result" );
    }
View Full Code Here

    }

    public void testRunlistenerJunitCoreProvider()
        throws Exception
    {
        final OutputValidator outputValidator =
            unpack().addGoal( "-Dprovider=surefire-junit47" ).setJUnitVersion( "4.8.1" ).addGoal(
                "-DjunitVersion=4.8.1" ).executeTest().verifyErrorFreeLog();   // Todo: Fix junitVesion
        assertResults( outputValidator );
        outputValidator.verifyTextInLog( "testRunStarted null" );
        outputValidator.verifyTextInLog( "testFinished simpleTest" );
        outputValidator.verifyTextInLog( "testRunFinished org.junit.runner.Result" );
    }
View Full Code Here

    // testing random is left as an exercise to the reader. Patches welcome

    public void testAlphabetical()
        throws Exception
    {
        OutputValidator validator = executeWithRunOrder( "alphabetical" );
        assertTestnamesAppearInSpecificOrder( validator, TESTS_IN_ALPHABETICAL_ORDER );
    }
View Full Code Here

    }

    public void testReverseAlphabetical()
        throws Exception
    {
        OutputValidator validator = executeWithRunOrder( "reversealphabetical" );
        assertTestnamesAppearInSpecificOrder( validator, TESTS_IN_REVERSE_ALPHABETICAL_ORDER );
    }
View Full Code Here

    public void testHourly()
        throws Exception
    {
        int startHour = Calendar.getInstance().get( Calendar.HOUR_OF_DAY );
        OutputValidator validator = executeWithRunOrder( "hourly" );
        int endHour = Calendar.getInstance().get( Calendar.HOUR_OF_DAY );
        if ( startHour != endHour )
        {
            return; // Race condition, cannot test when hour changed mid-run
        }
View Full Code Here

    extends SurefireIntegrationTestCase
{
    public void testPrintSummaryTrueWithRedirect()
        throws Exception
    {
        final OutputValidator clean = unpack().redirectToFile( true ).addGoal( "clean" ).executeTest();
        checkReports( clean );
    }
View Full Code Here

    }

    public void testClassesParallel()
        throws Exception
    {
        final OutputValidator clean =
            unpack().redirectToFile( true ).addGoal( "clean" ).parallelClasses().executeTest();
        checkReports( clean );
    }
View Full Code Here

TOP

Related Classes of org.apache.maven.surefire.its.fixture.OutputValidator

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.