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

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


    public void testOptionalSurefireReportGeneration()
    {
        OutputValidator validator = unpack().activateProfile(
            "optionalSurefire" ).addFailsafeReportOnlyGoal().addSurefireReportOnlyGoal().executeCurrentGoals();

        TestFile siteFile = validator.getSiteFile( "surefire-report.html" );
        assertFalse( "Expecting no surefire report file", siteFile.isFile() );

        siteFile = validator.getSiteFile( "failsafe-report.html" );
        assertTrue( "Expecting failsafe report file", siteFile.isFile() );
    }
View Full Code Here


    public void testSkipOptionalSurefireReportGeneration()
    {
        OutputValidator validator = unpack().activateProfile( "optionalSurefire" ).activateProfile(
            "skipSurefire" ).addFailsafeReportOnlyGoal().addSurefireReportOnlyGoal().executeCurrentGoals();

        TestFile siteFile = validator.getSiteFile( "surefire-report.html" );
        assertFalse( "Expecting no surefire report file", siteFile.isFile() );

        siteFile = validator.getSiteFile( "failsafe-report.html" );
        assertTrue( "Expecting failsafe report file", siteFile.isFile() );
    }
View Full Code Here

    public void testRussianLocaleReport()
    {
        OutputValidator validator = unpack( "/surefire-740-comma-truncated" ).setMavenOpts(
                                                                                         "-Duser.language=ru -Duser.country=RU" ).failNever().addSurefireReportGoal().executeCurrentGoals();

        TestFile siteFile = validator.getSiteFile( "surefire-report.html" );
        assertTrue( "Expecting file", siteFile.exists() );
        siteFile.assertContainsText( "027" ); // Avoid asserting with the "," or "." ;)
    }
View Full Code Here

    public void testReportGeneration()
    {
        OutputValidator validator =
            unpack().addFailsafeReportOnlyGoal().addSurefireReportOnlyGoal().executeCurrentGoals();

        TestFile siteFile = validator.getSiteFile( "surefire-report.html" );
        assertTrue( "Expecting surefire report file", siteFile.isFile() );

        siteFile = validator.getSiteFile( "failsafe-report.html" );
        assertTrue( "Expecting failsafe report file", siteFile.isFile() );
    }
View Full Code Here

    public void testSkippedSurefireReportGeneration()
    {
        OutputValidator validator = unpack().activateProfile(
            "skipSurefire" ).addFailsafeReportOnlyGoal().addSurefireReportOnlyGoal().executeCurrentGoals();

        TestFile siteFile = validator.getSiteFile( "surefire-report.html" );
        assertFalse( "Expecting no surefire report file", siteFile.isFile() );

        siteFile = validator.getSiteFile( "failsafe-report.html" );
        assertTrue( "Expecting failsafe report file", siteFile.isFile() );
    }
View Full Code Here

    public void testOptionalSurefireReportGeneration()
    {
        OutputValidator validator = unpack().activateProfile(
            "optionalSurefire" ).addFailsafeReportOnlyGoal().addSurefireReportOnlyGoal().executeCurrentGoals();

        TestFile siteFile = validator.getSiteFile( "surefire-report.html" );
        assertFalse( "Expecting no surefire report file", siteFile.isFile() );

        siteFile = validator.getSiteFile( "failsafe-report.html" );
        assertTrue( "Expecting failsafe report file", siteFile.isFile() );
    }
View Full Code Here

    public void testSkipOptionalSurefireReportGeneration()
    {
        OutputValidator validator = unpack().activateProfile( "optionalSurefire" ).activateProfile(
            "skipSurefire" ).addFailsafeReportOnlyGoal().addSurefireReportOnlyGoal().executeCurrentGoals();

        TestFile siteFile = validator.getSiteFile( "surefire-report.html" );
        assertFalse( "Expecting no surefire report file", siteFile.isFile() );

        siteFile = validator.getSiteFile( "failsafe-report.html" );
        assertTrue( "Expecting failsafe report file", siteFile.isFile() );
    }
View Full Code Here

{
    @Test
    public void testBuildFailingWhenErrors()
    {
        OutputValidator outputValidator = unpack( "/surefire-500-puzzling-error" ).failNever().executeTest();
        TestFile surefireReportsFile = outputValidator.getSurefireReportsFile( "surefire500.ExplodingTest.txt" );
        surefireReportsFile.assertContainsText( "java.lang.NoClassDefFoundError: whoops!" );
    }
View Full Code Here

        OutputValidator validator = unpack( "surefire-985-parameterized-and-categories" ).maven().executeTest();
        validator.assertTestSuiteResults( 12, 0, 0, 0 );

        assertFalse( validator.getSurefireReportsXmlFile( "TEST-sample.parameterized.Parameterized01Test.xml" ).exists() );

        TestFile reportFile2 =
            validator.getSurefireReportsXmlFile( "TEST-sample.parameterized.Parameterized02Test.xml" );
        assertTestCount( reportFile2, 4 );

        TestFile reportFile3 =
            validator.getSurefireReportsXmlFile( "TEST-sample.parameterized.Parameterized03Test.xml" );
        assertTestCount( reportFile3, 8 );

    }
View Full Code Here

    @Test
    public void properNewlines()
    {
        final OutputValidator outputValidator =
            unpack( "/consoleOutput" ).redirectToFile( true ).setJUnitVersion( "4.7" ).executeTest();
        TestFile surefireReportsFile = outputValidator.getSurefireReportsFile( "consoleOutput.Test1-output.txt" );
        surefireReportsFile.assertContainsText( "SoutAgain" );
        surefireReportsFile.assertContainsText( "Printline in shutdown hook" );
    }
View Full Code Here

TOP

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

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.