Examples of FlatScenarioSteps


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

    public void ignored_test_groups_should_be_skipped() {

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

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

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

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

        StepEventBus.getEventBus().testFinished(testOutcome);
View Full Code Here

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

    public void a_test_group_with_an_annotated_title_should_record_the_title() {

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

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

        steps.step_with_title();

        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_test_group_without_an_annotated_title_should_record_the_humanized_group_name() {

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

        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

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

    public void succeeding_test_groups_should_be_marked_as_successful_by_default() {

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

        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

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

    public void steps_should_be_skipped_after_a_failure() {

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

        FlatScenarioSteps steps = stepFactory.getStepLibraryFor(FlatScenarioSteps.class);
        steps.step_one();
        steps.failingStep();
        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 steps_should_not_be_skipped_after_an_ignored_test() {

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

        FlatScenarioSteps steps = stepFactory.getStepLibraryFor(FlatScenarioSteps.class);
        steps.step_one();
        steps.ignoredStep();
        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 the_legacy_step_group_annotation_can_also_be_used() {

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

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


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

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

    public void if_configured_should_pause_after_step() {

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

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

        environmentVariables.setProperty(ThucydidesSystemProperty.THUCYDIDES_STEP_DELAY.getPropertyName(), "100");

        long startTime = System.currentTimeMillis();
        steps.step_one();
        steps.step_two();
        long stepDuration = System.currentTimeMillis() - startTime;

        assertThat((int) stepDuration, greaterThanOrEqualTo(100));
    }
View Full Code Here

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

    public void screenshots_should_be_taken_before_and_after_steps_by_default() {

        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);

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

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

    public void subsequent_identical_screenshots_should_not_be_duplicated_between_steps() {

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

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

        assertThat(stepListener.getCurrentTestOutcome().getTestSteps().get(1).getScreenshotCount(), is(1));
    }
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.