Examples of FlatScenarioSteps


Examples of net.thucydides.core.steps.samples.FlatScenarioSteps

    public void the_test_outcome_title_should_come_from_the_user_story() {

        StepEventBus.getEventBus().testSuiteStarted(MyTestCase.class);
        StepEventBus.getEventBus().testStarted("app_should_work");

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

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

        List<TestOutcome> results = stepListener.getTestOutcomes();
        TestOutcome testOutcome = results.get(0);
        assertThat(testOutcome.getTitle(), is("App should work"));
View Full Code Here

Examples of net.thucydides.core.steps.samples.FlatScenarioSteps

    public void when_the_user_story_is_undefined_the_test_outcome_title_should_come_from_the_test_case() {

        StepEventBus.getEventBus().testSuiteStarted(MyTestCaseWithoutAStory.class);
        StepEventBus.getEventBus().testStarted("app_should_work");

        FlatScenarioSteps steps = stepFactory.getStepLibraryFor(FlatScenarioSteps.class);
        steps.step_one();
        steps.step_two();
        StepEventBus.getEventBus().testFinished(testOutcome);

        List<TestOutcome> results = stepListener.getTestOutcomes();
        TestOutcome testOutcome = results.get(0);
        assertThat(testOutcome.getTitle(), is("App should work"));
View Full Code Here

Examples of net.thucydides.core.steps.samples.FlatScenarioSteps

    public void the_step_listener_should_record_the_overall_test_result() {

        StepEventBus.getEventBus().testSuiteStarted(MyTestCase.class);
        StepEventBus.getEventBus().testStarted("app_should_work");

        FlatScenarioSteps steps = stepFactory.getStepLibraryFor(FlatScenarioSteps.class);
        steps.step_one();
        steps.step_two();
        StepEventBus.getEventBus().testFinished(testOutcome);

        List<TestOutcome> results = stepListener.getTestOutcomes();
        TestOutcome testOutcome = results.get(0);
View Full Code Here

Examples of net.thucydides.core.steps.samples.FlatScenarioSteps

    public void a_failing_step_should_record_the_failure() {

        StepEventBus.getEventBus().testSuiteStarted(MyTestCase.class);
        StepEventBus.getEventBus().testStarted("app_should_work");

        FlatScenarioSteps steps = stepFactory.getStepLibraryFor(FlatScenarioSteps.class);
        steps.step_one();
        steps.failingStep();
        StepEventBus.getEventBus().testFinished(testOutcome);

        List<TestOutcome> results = stepListener.getTestOutcomes();
        TestOutcome testOutcome = results.get(0);
        assertThat(testOutcome.getResult(), is(TestResult.FAILURE));
View Full Code Here

Examples of net.thucydides.core.steps.samples.FlatScenarioSteps

    public void should_call_object_methods_normally() {

        StepEventBus.getEventBus().testSuiteStarted(MyTestCase.class);
        StepEventBus.getEventBus().testStarted("app_should_work");

        FlatScenarioSteps steps = stepFactory.getStepLibraryFor(FlatScenarioSteps.class);
        steps.step_one();
        String stringValue = steps.toString();
        steps.step_two();
        StepEventBus.getEventBus().testFinished(testOutcome);

        List<TestOutcome> results = stepListener.getTestOutcomes();
        TestOutcome testOutcome = results.get(0);
        assertThat(testOutcome.getTestSteps().size(), is(2));
View Full Code Here

Examples of net.thucydides.core.steps.samples.FlatScenarioSteps

    public void should_call_object_methods_normally_after_test_failures() {

        StepEventBus.getEventBus().testSuiteStarted(MyTestCase.class);
        StepEventBus.getEventBus().testStarted("app_should_work");

        FlatScenarioSteps steps = stepFactory.getStepLibraryFor(FlatScenarioSteps.class);
        steps.step_one();
        steps.failingStep();
        String stringValue = steps.toString();
        steps.step_two();
        StepEventBus.getEventBus().testFinished(testOutcome);

        List<TestOutcome> results = stepListener.getTestOutcomes();
        TestOutcome testOutcome = results.get(0);
        assertThat(testOutcome.getTestSteps().size(), is(3));
View Full Code Here

Examples of net.thucydides.core.steps.samples.FlatScenarioSteps

    public void after_a_failing_step_subsequent_errors_should_be_ignored() {

        StepEventBus.getEventBus().testSuiteStarted(MyTestCase.class);
        StepEventBus.getEventBus().testStarted("app_should_work");

        FlatScenarioSteps steps = stepFactory.getStepLibraryFor(FlatScenarioSteps.class);
        steps.step_one();
        steps.failingStep();
        steps.stepCausingANullPointerException();
        steps.step_two();
        StepEventBus.getEventBus().testFinished(testOutcome);

        List<TestOutcome> results = stepListener.getTestOutcomes();
        assertThat(results.get(0).getTestSteps().size(), is(4));
    }
View Full Code Here

Examples of net.thucydides.core.steps.samples.FlatScenarioSteps

    public void after_a_failing_step_subsequent_unannotated_errors_should_be_ignored() {

        StepEventBus.getEventBus().testSuiteStarted(MyTestCase.class);
        StepEventBus.getEventBus().testStarted("app_should_work");

        FlatScenarioSteps steps = stepFactory.getStepLibraryFor(FlatScenarioSteps.class);
        steps.step_one();
        steps.failingStep();
        steps.unannotatedStepCausingANullPointerException();
        steps.step_two();
        StepEventBus.getEventBus().testFinished(testOutcome);

        List<TestOutcome> results = stepListener.getTestOutcomes();
        assertThat(results.get(0).getTestSteps().size(), is(3));
    }
View Full Code Here

Examples of net.thucydides.core.steps.samples.FlatScenarioSteps

    public void a_failing_step_should_record_the_failure_cause() {

        StepEventBus.getEventBus().testSuiteStarted(MyTestCase.class);
        StepEventBus.getEventBus().testStarted("app_should_work");

        FlatScenarioSteps steps = stepFactory.getStepLibraryFor(FlatScenarioSteps.class);
        steps.step_one();
        steps.failingStep();
        StepEventBus.getEventBus().testFinished(testOutcome);

        List<TestOutcome> results = stepListener.getTestOutcomes();
        TestOutcome testOutcome = results.get(0);
        assertThat(testOutcome.getTestFailureMessage(), is("Step failed"));
View Full Code Here

Examples of net.thucydides.core.steps.samples.FlatScenarioSteps

    public void a_failing_step_should_record_the_failure_details_with_the_step() {

        StepEventBus.getEventBus().testSuiteStarted(MyTestCase.class);
        StepEventBus.getEventBus().testStarted("app_should_work");

        FlatScenarioSteps steps = stepFactory.getStepLibraryFor(FlatScenarioSteps.class);
        steps.step_one();
        steps.failingStep();
        StepEventBus.getEventBus().testFinished(testOutcome);

        List<TestOutcome> results = stepListener.getTestOutcomes();
        TestOutcome testOutcome = results.get(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.