Examples of SurefireLauncher


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

    }

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

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

        assertTrue( "Expecting failsafe report file", siteFile.isFile() );
    }

    public SurefireLauncher unpack()
    {
        SurefireLauncher unpack = unpack( "/surefire-772-no-surefire-reports" );
         unpack.maven().failNever().deleteSiteDir().skipClean( );
        return unpack;
    }
View Full Code Here

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

{
    @SuppressWarnings( { "ResultOfMethodCallIgnored" } )
    public void testCharsetProvider()
        throws Exception
    {
        SurefireLauncher unpack = unpack( "/surefire-162-charsetProvider" );
        MavenLauncher maven = unpack.maven();
        OutputValidator verifier = maven.getValidator();
        File jarFile = maven.getArtifactPath( "jcharset", "jcharset", "1.2.1", "jar" );
        File pomFile = maven.getArtifactPath( "jcharset", "jcharset", "1.2.1", "pom" );
        jarFile.getParentFile().mkdirs();
        FileUtils.copyFile( verifier.getSubFile( "repo/jcharset/jcharset/1.2.1/jcharset-1.2.1.jar" ), jarFile );
        FileUtils.copyFile( verifier.getSubFile( "repo/jcharset/jcharset/1.2.1/jcharset-1.2.1.pom" ), pomFile );
        unpack.executeTest().verifyErrorFree( 1 );
    }
View Full Code Here

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

{

    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

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

public class Surefire569RunTestFromDependencyJarsIT
  extends  SurefireJUnit4IntegrationTestCase {

  @Test
  public void shouldScanAndRunTestsInDependencyJars() throws Exception {
    SurefireLauncher launcher = unpack( "surefire-569-RunTestFromDependencyJars" );
    launcher.addGoal("test").addGoal("install");
    launcher.executeCurrentGoals();

    OutputValidator module1 = launcher.getSubProjectValidator("module1");
    module1.assertTestSuiteResults(1, 0, 0, 0);
  }
View Full Code Here

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

    }

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

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

        assertTrue( "Expecting failsafe report file", siteFile.isFile() );
    }

    public SurefireLauncher unpack()
    {
        SurefireLauncher unpack = unpack( "/surefire-772-no-surefire-reports" );
         unpack.maven().failNever().deleteSiteDir().skipClean( );
        return unpack;
    }
View Full Code Here

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

    extends SurefireJUnit4IntegrationTestCase
{
    @Test
    public void testSecurityManager()
    {
        SurefireLauncher surefireLauncher = unpack( "surefire-34-securityManager" ).failNever();
        surefireLauncher.executeTest().assertTestSuiteResults( 2, 1, 0, 0 );
    }
View Full Code Here

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

    }

    @Test
    public void testSecurityManagerSuccessful()
    {
        SurefireLauncher surefireLauncher = unpack( "surefire-34-securityManager-success" );
        surefireLauncher.executeTest().assertTestSuiteResults( 2, 0, 0, 0 );
    }
View Full Code Here

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

    @Test
    public void systemProperties()
        throws VerificationException
    {
        SurefireLauncher launcher = unpack1();

        OutputValidator validator = launcher.executeTest().verifyErrorFree( 1 );

        for ( String line : validator.loadLogLines() )
        {
            if ( "emptyProperty=''".equals( line ) )
            {
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.