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

Examples of org.apache.maven.surefire.its.fixture.OutputValidator.verifyTextInLog()


    private void assertForkMode( String forkMode )
        throws IOException, VerificationException
    {
        OutputValidator outputValidator = unpack( "result-counting" ).failNever().forkMode( forkMode ).executeTest();
        outputValidator.assertTestSuiteResults( 36, 23, 4, 2 );
        outputValidator.verifyTextInLog( "Tests run: 36, Failures: 4, Errors: 23, Skipped: 2" );
    }
}
View Full Code Here


    @Test
    public void executionError()
        throws Exception
    {
        OutputValidator outputValidator = unpack( "/testng-execute-error" ).maven().withFailure().executeTest();
        outputValidator.verifyTextInLog( "at org.apache.maven.surefire.testng.TestNGExecutor.run" );
    }
}
View Full Code Here

        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" );
    }

    @Test
View Full Code Here

    {
        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" );
    }

    @Test
    public void testRunlistenerJunitCoreProvider()
View Full Code Here

        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" );
    }

    @Test
    public void testRunlistenerJunitCoreProvider()
        throws Exception
View Full Code Here

    {
        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" );
    }

    private void assertResults( OutputValidator outputValidator )
View Full Code Here

        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" );
    }

    private void assertResults( OutputValidator outputValidator )
    {
View Full Code Here

            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" );
    }

    private void assertResults( OutputValidator outputValidator )
    {
        outputValidator.assertTestSuiteResults( 1, 0, 0, 0 );
View Full Code Here

    @Test
    public void misg()
        throws Exception
    {
        OutputValidator outputValidator = unpack( "/junit48-smartStackTrace" ).maven().withFailure().executeTest();
        outputValidator.verifyTextInLog( "SmartStackTraceTest.shouldFailInMethodButDoesnt Expected exception: java.lang.RuntimeException" );
        outputValidator.verifyTextInLog( "SmartStackTraceTest.shortName Expected exception: java.io.IOException" );

    }
}
View Full Code Here

    public void misg()
        throws Exception
    {
        OutputValidator outputValidator = unpack( "/junit48-smartStackTrace" ).maven().withFailure().executeTest();
        outputValidator.verifyTextInLog( "SmartStackTraceTest.shouldFailInMethodButDoesnt Expected exception: java.lang.RuntimeException" );
        outputValidator.verifyTextInLog( "SmartStackTraceTest.shortName Expected exception: java.io.IOException" );

    }
}
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.