Examples of NestedScenarioSteps


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

    public void screenshots_should_be_taken_after_nested_steps() {

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

        NestedScenarioSteps steps = stepFactory.getStepLibraryFor(NestedScenarioSteps.class);
        steps.step1();
        steps.step2();
        StepEventBus.getEventBus().testFinished(testOutcome);

        verify(driver, times(14)).getScreenshotAs((OutputType<?>) anyObject());
    }
View Full Code Here

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

        when(driver.getScreenshotAs(any(OutputType.class))).thenThrow(new ScreenshotException("Screenshot failed", null));

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

        NestedScenarioSteps steps = stepFactory.getStepLibraryFor(NestedScenarioSteps.class);
        steps.step1();
        steps.step2();
        StepEventBus.getEventBus().testFinished(testOutcome);

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

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

    public void screenshot_source_will_not_be_stored_by_default() {

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

        NestedScenarioSteps steps = stepFactory.getStepLibraryFor(NestedScenarioSteps.class);
        steps.step1();
        steps.step2();
        StepEventBus.getEventBus().testFinished(testOutcome);

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

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

    public void blurred_screenshots_will_be_stored_if_configured() throws IOException {

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

        NestedScenarioSteps steps = stepFactory.getStepLibraryFor(NestedScenarioSteps.class);
        steps.blurred_step();
        StepEventBus.getEventBus().testFinished(testOutcome);

        verify(driver, times(2)).getScreenshotAs((OutputType<?>) anyObject());
    }
View Full Code Here

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

    public void steps_should_be_skipped_after_a_failure_in_a_nested_step() {

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

        NestedScenarioSteps steps = stepFactory.getStepLibraryFor(NestedScenarioSteps.class);
        steps.step1();
        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], "
View Full Code Here

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

    public void steps_with_failing_nested_steps_should_record_the_step_failure() {

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

        NestedScenarioSteps steps = stepFactory.getStepLibraryFor(NestedScenarioSteps.class);
        steps.step1();
        steps.step_with_nested_failure();


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

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

    @Test
    public void should_return_failing_test_exception() {
        StepEventBus.getEventBus().testSuiteStarted(MyTestCase.class);
        StepEventBus.getEventBus().testStarted("app_should_work");

        NestedScenarioSteps steps = stepFactory.getStepLibraryFor(NestedScenarioSteps.class);
        steps.step1();
        steps.step_with_nested_failure();

        assertThat(stepListener.getTestFailureCause().getMessage(), is("Step failed"));

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