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

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


        assertFalse( "pid 1 is not the same as the main process' pid", pids[0].equals( getMainPID() ) );
    }

    private String getMainPID()
    {
        final TestFile targetFile = outputValidator.getTargetFile( "maven.pid" );
        String pid = targetFile.slurpFile();
        return pid + " testValue_1_1";
    }
View Full Code Here


        outputValidator = forkMode.executeTest();
        outputValidator.verifyErrorFreeLog().assertTestSuiteResults( 3, 0, 0, 0 );
        String[] pids = new String[3];
        for ( int i = 1; i <= pids.length; i++ )
        {
            final TestFile targetFile = outputValidator.getTargetFile( "test" + i + "-pid" );
            String pid = targetFile.slurpFile();
            pids[i - 1] = pid;
        }
        return pids;
    }
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

        Assume.assumeTrue( dest.exists() );
        Assume.assumeTrue(
            !new File( unpacked.getUnpackedAt(), "src/test/java/junit/twoTestCases/????Test.java" ).exists() );

        OutputValidator outputValidator = unpacked.executeTest().assertTestSuiteResults( 2, 0, 0, 0 );
        TestFile surefireReportsFile = outputValidator.getSurefireReportsFile( "junit.twoTestCases.而索其情Test.txt" );
        Assert.assertTrue( surefireReportsFile.exists() );
        //surefireReportsFile .assertContainsText( "junit.twoTestCases.\u800C\u7D22\u5176\u60C5Test.txt" );
    }
View Full Code Here

    @Test
    public void xmlFileContainsConsoleOutput()
    {
        final OutputValidator outputValidator = unpack( "/fork-consoleOutputWithErrors" ).
            failNever().redirectToFile( true ).executeTest();
        final TestFile surefireReportsFile =
            outputValidator.getSurefireReportsXmlFile( "TEST-forkConsoleOutput.Test2.xml" );
        surefireReportsFile.assertContainsText( "sout: Will Fail soon" );
        surefireReportsFile.assertContainsText( "serr: Will Fail now" );
    }
View Full Code Here

    {
        OutputValidator validator =
            unpack( "surefire-628-consoleoutputbeforeandafterclass" ).failNever().redirectToFile(
                true ).parallelClasses().executeTest();

        final TestFile surefireReportsFile = validator.getSurefireReportsFile( "surefire628.Test2-output.txt" );

        surefireReportsFile.assertContainsText( "628Test2" ).assertContainsText(
            "BeforeClass628Test2" ).assertContainsText( "AfterClass628Test2" );
    }
View Full Code Here

        throws Exception
    {
        OutputValidator outputValidator =
            unpack().addFailsafeReportOnlyGoal().addSurefireReportOnlyGoal().executeCurrentGoals();

        TestFile siteFile = outputValidator.getSiteFile( "surefire-report.html" );
        System.out.println( "siteFile.getAbsolutePath() = " + siteFile.getAbsolutePath() );
        assertTrue( "Expecting surefire report file", siteFile.isFile() );

        siteFile = outputValidator.getSiteFile( "failsafe-report.html" );
        System.out.println( "siteFile.getAbsolutePath() = " + siteFile.getAbsolutePath() );
        assertTrue( "Expecting failsafe report file", siteFile.isFile() );
    }
View Full Code Here

    {
        OutputValidator validator = unpack().
            activateProfile(
                "skipFailsafe" ).addFailsafeReportOnlyGoal().addSurefireReportOnlyGoal().executeCurrentGoals();

        TestFile siteFile = validator.getSiteFile( "surefire-report.html" );
        System.out.println( "siteFile.getAbsolutePath() = " + siteFile.getAbsolutePath() );
        assertTrue( "Expecting surefire report file", siteFile.isFile() );

        siteFile = validator.getSiteFile( "failsafe-report.html" );
        System.out.println( "siteFile.getAbsolutePath() = " + siteFile.getAbsolutePath() );
        assertFalse( "Expecting no failsafe report file", siteFile.isFile() );
    }
View Full Code Here

    {
        OutputValidator validator = unpack().failNever().
            activateProfile(
                "skipSurefire" ).addFailsafeReportOnlyGoal().addSurefireReportOnlyGoal().executeCurrentGoals();

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

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

        final OutputValidator outputValidator = forkMode.executeTest();
        outputValidator.verifyErrorFreeLog().assertTestSuiteResults( 3, 0, 0, 0 );
        String[] pids = new String[3];
        for ( int i = 1; i <= pids.length; i++ )
        {
            final TestFile targetFile = outputValidator.getTargetFile( "test" + i + "-pid" );
            String pid = targetFile.slurpFile();
            pids[i - 1] = pid;
        }
        return pids;
    }
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.