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

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


    extends SurefireJUnit4IntegrationTestCase
{
    @Test
    public void TestNgListenerReporter()
    {
        final SurefireLauncher verifierStarter = unpack( "testng-listener-reporter" );
        verifierStarter.executeTest().verifyErrorFree( 1 ).getTargetFile(
            "resultlistener-output.txt" ).assertFileExists().getTargetFile(
            "suitelistener-output.txt" ).assertFileExists().getTargetFile( "reporter-output.txt" ).assertFileExists();
    }
View Full Code Here


    extends SurefireJUnit4IntegrationTestCase
{
    @Test
    public void checkFileNamesWithUnicode()
    {
        SurefireLauncher unpacked = unpack( "unicode-testnames" );
        File xxyz = new File( unpacked.getUnpackedAt(), "src/test/java/junit/twoTestCases/XXYZTest.java" );

        File dest = new File( unpacked.getUnpackedAt(),
                              "src/test/java/junit/twoTestCases/\u800C\u7D22\u5176\u60C5Test.java" );

        Assume.assumeTrue( xxyz.renameTo( dest ) );
        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 testSiblingAggregator()
        throws Exception
    {
        final SurefireLauncher unpack = unpack( "sibling-aggregator" );
        SurefireLauncher aggregator = unpack.getSubProjectLauncher( "aggregator" );
        aggregator.executeTest().verifyErrorFreeLog();
        OutputValidator child2 = unpack.getSubProjectValidator( "child2" );
        child2.assertTestSuiteResults( 1, 0, 0, 0 );
    }
View Full Code Here

    }

    SurefireLauncher specialUnpack()
        throws VerificationException, IOException
    {
        SurefireLauncher unpack = unpack( "junit-pathWithUmlaut" );
        MavenLauncher maven = unpack.maven();

        File dest = new File( maven.getUnpackedAt().getParentFile().getPath(), "/junit-pathWith\u00DCmlaut" );
        maven.moveUnpackTo( dest );
        return unpack;
    }
View Full Code Here

            4, 0, 2, 0 );
    }

    public void testOneExecutionRunInTwoBuilds()
    {
        SurefireLauncher launcher = unpack( "/surefire-803-multiFailsafeExec-rebuildOverwrites" );
        launcher.addD( "success", "false" ).executeVerifyWithFailure().assertIntegrationTestSuiteResults( 1, 0, 1, 0 );
        launcher.reset();
        launcher.addD( "success", "true" ).executeVerify().assertIntegrationTestSuiteResults( 1, 0, 0, 0 );
    }
View Full Code Here

    public void testReportWithAggregate()
        throws Exception
    {

        SurefireLauncher surefireLauncher = unpack().failNever();
        surefireLauncher.executeTest();
        surefireLauncher.addGoal( "-Daggregate=true" );
        OutputValidator validator = surefireLauncher.execute( "surefire-report:report" );
        TestFile siteFile = validator.getSiteFile( "surefire-report.html" );
        siteFile.assertContainsText( "MyModule1ClassTest" );
        siteFile.assertContainsText( "MyModule2ClassTest" );
        siteFile.assertContainsText( "MyDummyClassM1Test" );
    }
View Full Code Here

    }

    public void testReportWithoutAggregate()
        throws Exception
    {
        SurefireLauncher surefireLauncher = unpack().failNever();
        surefireLauncher.executeTest();
        surefireLauncher.reset();
        surefireLauncher.execute( "surefire-report:report" );
        OutputValidator module1 = surefireLauncher.getSubProjectValidator( "module1" );
        TestFile siteFile = module1.getSiteFile( "surefire-report.html" );
        siteFile.assertContainsText( "MyModule1ClassTest" );
        siteFile.assertContainsText( "MyDummyClassM1Test" );
    }
View Full Code Here

    {
        final File unpackLocation = unpack( "junit-pathWithUmlaut" ).getUnpackLocation();
        File dest = new File( unpackLocation.getParentFile().getPath(), "/junit-pathWith\u00DCmlaut" );
        FileUtils.deleteDirectory( dest );
        unpackLocation.renameTo( dest );
        return new SurefireLauncher( new Verifier( dest.getAbsolutePath() ) );
    }
View Full Code Here

{

    public void testWorkingDirectory()
        throws Exception
    {
        final SurefireLauncher unpack = getUnpacked();
        final OutputValidator child = getPreparedChild( unpack );
        unpack.executeTest().verifyErrorFreeLog();
        child.assertTestSuiteResults( 1, 0, 0, 0 );
        verifyOutputDirectory( child );
    }
View Full Code Here

    }

    public void testWorkingDirectoryNoFork()
        throws Exception
    {
        final SurefireLauncher unpack = getUnpacked();
        final OutputValidator child = getPreparedChild( unpack );
        unpack.forkNever().executeTest().verifyErrorFreeLog();
        child.assertTestSuiteResults( 1, 0, 0, 0 );
        verifyOutputDirectory( child );
    }
View Full Code Here

TOP

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

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.