Examples of assertTestSuiteResults()


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

    @Test
    public void testJUnitRunCategoryNotC()
    {
        OutputValidator validator = unpackJUnit().groups( "!junit4.CategoryC" ).executeTest();
        validator.verifyErrorFreeLog();
        validator.assertTestSuiteResults( 5, 0, 0, 0 );
        validator.verifyTextInLog( "catA: 2" );
        validator.verifyTextInLog( "catB: 2" );
        validator.verifyTextInLog( "catC: 0" );
        validator.verifyTextInLog( "catNone: 1" );
        validator.verifyTextInLog( "NoCategoryTest.CatNone: 1" );
View Full Code Here

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

    @Test
    public void testExcludedGroups()
    {
        OutputValidator validator = unpackJUnit().setExcludedGroups( "junit4.CategoryC" ).executeTest();
        validator.verifyErrorFreeLog();
        validator.assertTestSuiteResults( 5, 0, 0, 0 );
        validator.verifyTextInLog( "catA: 2" );
        validator.verifyTextInLog( "catB: 2" );
        validator.verifyTextInLog( "catC: 0" );
        validator.verifyTextInLog( "catNone: 1" );
        validator.verifyTextInLog( "NoCategoryTest.CatNone: 1" );
View Full Code Here

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

    @Test
    public void testNGRunCategoryAB()
    {
        OutputValidator validator = unpackTestNG().groups( "CategoryA AND CategoryB" ).debugLogging().executeTest();
        validator.verifyErrorFreeLog();
        validator.assertTestSuiteResults( 2, 0, 0, 0 );
        validator.verifyTextInLog( "BasicTest.testInCategoriesAB()" );
        validator.verifyTextInLog( "CategoryCTest.testInCategoriesAB()" );
    }

    @Test
View Full Code Here

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

    @Test
    public void testNGRunCategoryNotC()
    {
        OutputValidator validator = unpackTestNG().groups( "!CategoryC" ).debugLogging().executeTest();
        validator.verifyErrorFreeLog();
        validator.assertTestSuiteResults( 8, 0, 0, 0 );
        validator.verifyTextInLog( "catA: 2" );
        validator.verifyTextInLog( "catB: 2" );
        validator.verifyTextInLog( "catC: 0" );
        validator.verifyTextInLog( "catNone: 1" );
        validator.verifyTextInLog( "mA: 2" );
View Full Code Here

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

    @Test
    public void test()
        throws Exception
    {
        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" );
View Full Code Here

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

    @Test
    public void testWellFormedXmlFailures()
    {
        OutputValidator outputValidator = unpack( "/surefire-224-wellFormedXmlFailures" ).executeTest();

        outputValidator.assertTestSuiteResults( 4, 0, 4, 0 );

        ReportTestSuite suite =
            HelperAssertions.extractReports( ( new File[]{ outputValidator.getBaseDir() } ) ).get( 0 );
        List<org.apache.maven.plugins.surefire.report.ReportTestCase> testCases = suite.getTestCases();
        assertEquals( "Wrong number of test case objects", 4, testCases.size() );
View Full Code Here

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

    private void doTest( String parallelMode )
        throws Exception
    {
        OutputValidator validator =
            unpack( "surefire-943-report-content" ).maven().sysProp( "parallel", parallelMode ).withFailure().executeTest();
        validator.assertTestSuiteResults( 9, 0, 3, 3 );

        validate( validator, "org.sample.module.My1Test", 1 );
        validate( validator, "org.sample.module.My2Test", 1 );
        validate( validator, "org.sample.module.My3Test", 0 );
        validateSkipped( validator, "org.sample.module.My4Test" );
View Full Code Here

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

        {
            System.out.println( line );
        }
        System.out.println("===== END EXECUTION LOG =====");

        validator.assertTestSuiteResults( 10, 1, 3, 3 );

        validate( validator, "org.sample.module.My1Test", 1 );
        validate( validator, "org.sample.module.My2Test", 1 );
        validate( validator, "org.sample.module.My3Test", 0 );
        validateSkipped( validator, "org.sample.module.My4Test" );
View Full Code Here

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

    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.OutputValidator.assertTestSuiteResults()

public class TestNgSuccessPercentageIT extends SurefireJUnit4IntegrationTestCase {
    @Test
    public void testPassesWhenFailuresLessThanSuccessPercentage()
    {
        OutputValidator validator = unpack("/testng-succes-percentage").mavenTestFailureIgnore( true ).executeTest();
        validator.assertTestSuiteResults(8, 0, 1, 0);
    }

}
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.