Package net.thucydides.core.model

Examples of net.thucydides.core.model.TestOutcome


        steps.step_one();
        steps.ignored_group();

        List<TestOutcome> results = stepListener.getTestOutcomes();
        TestOutcome testOutcome = results.get(0);

        StepEventBus.getEventBus().testFinished(testOutcome);

        assertThat(testOutcome.toString(), is("App should work:Step one, Ignored group [Step three, Step two, Step one]"));
        assertThat(testOutcome.getTestSteps().get(1).getResult(), is(TestResult.IGNORED));
    }
View Full Code Here


        steps.step_with_title();

        StepEventBus.getEventBus().testFinished(testOutcome);

        List<TestOutcome> results = stepListener.getTestOutcomes();
        TestOutcome testOutcome = results.get(0);

        assertThat(testOutcome.getTestSteps().get(0).getDescription(), is("A step with a title"));
    }
View Full Code Here

        FluentScenarioSteps steps = stepFactory.getStepLibraryFor(FluentScenarioSteps.class);

        steps.when().someone().does().this_sort_of_thing();

        List<TestOutcome> results = stepListener.getTestOutcomes();
        TestOutcome testOutcome = results.get(0);

        assertThat(testOutcome.getTestSteps().get(0).getDescription(), is("When someone does this sort of thing"));
    }
View Full Code Here

        FlatScenarioSteps steps = stepFactory.getStepLibraryFor(FlatScenarioSteps.class);

        steps.a_plain_step_group();

        List<TestOutcome> results = stepListener.getTestOutcomes();
        TestOutcome testOutcome = results.get(0);

        assertThat(testOutcome.getTestSteps().get(0).getDescription(), is("A plain step group"));
    }
View Full Code Here

        FlatScenarioSteps steps = stepFactory.getStepLibraryFor(FlatScenarioSteps.class);

        steps.grouped_steps();

        List<TestOutcome> results = stepListener.getTestOutcomes();
        TestOutcome testOutcome = results.get(0);

        assertThat(testOutcome.getTestSteps().get(0).getResult(), is(TestResult.SUCCESS));
    }
View Full Code Here

        steps.failingStep();
        steps.step_two();
        StepEventBus.getEventBus().testFinished(testOutcome);

        List<TestOutcome> results = stepListener.getTestOutcomes();
        TestOutcome testOutcome = results.get(0);

        assertThat(testOutcome.toString(), is("App should work:Step one, Failing step, Step two"));
        assertThat(testOutcome.getTestSteps().get(2).getResult(), is(TestResult.SKIPPED));
    }
View Full Code Here

        steps.nestedFailingStep();
        steps.step2();
        StepEventBus.getEventBus().testFinished(testOutcome);

        List<TestOutcome> results = stepListener.getTestOutcomes();
        TestOutcome testOutcome = results.get(0);
        assertThat(testOutcome.toString(), is("App should work:Step1 [Step one, Step two, Step three], "
                + "Nested failing step [Failing step], Step2 [Step one, Step three]"));

        assertThat(testOutcome.getTestSteps().get(2).getResult(), is(TestResult.SKIPPED));
    }
View Full Code Here

        steps.ignoredStep();
        steps.step_two();
        StepEventBus.getEventBus().testFinished(testOutcome);

        List<TestOutcome> results = stepListener.getTestOutcomes();
        TestOutcome testOutcome = results.get(0);

        assertThat(testOutcome.toString(), is("App should work:Step one, Ignored step, Step two"));
        assertThat(testOutcome.getTestSteps().get(2).getResult(), is(TestResult.SUCCESS));
    }
View Full Code Here

        steps.step1();
        steps.step_with_nested_failure();


        List<TestOutcome> results = stepListener.getTestOutcomes();
        TestOutcome testOutcome = results.get(0);

        assertThat(testOutcome.toString(), is("App should work:Step1 [Step one, Step two, Step three], Step with nested failure [Step one, Failing step]"));
        assertThat(testOutcome.getResult(), is(TestResult.FAILURE));
    }
View Full Code Here

        FlatScenarioSteps steps = stepFactory.getStepLibraryFor(FlatScenarioSteps.class);
        steps.a_step_group();


        List<TestOutcome> results = stepListener.getTestOutcomes();
        TestOutcome testOutcome = results.get(0);

        assertThat(testOutcome.toString(), is("App should work:Annotated step group title [Step with long name, Step with long name and underscores]"));
    }
View Full Code Here

TOP

Related Classes of net.thucydides.core.model.TestOutcome

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.