Examples of TestOutcome


Examples of net.thucydides.core.model.TestOutcome

        runner.run(new RunNotifier());

        List<TestOutcome> executedSteps = runner.getTestOutcomes();
        assertThat(executedSteps.size(), is(1));
        TestOutcome testOutcome1 = executedSteps.get(0);

        List<TestStep> dataDrivenSteps = testOutcome1.getTestSteps().get(0).getChildren();
        assertThat(dataDrivenSteps.size(), is(12));

    }
View Full Code Here

Examples of net.thucydides.core.model.TestOutcome

        runner.run(new RunNotifier());

        List<TestOutcome> executedSteps = runner.getTestOutcomes();
        assertThat(executedSteps.size(), is(1));
        TestOutcome testOutcome1 = executedSteps.get(0);

        List<TestStep> dataDrivenSteps = testOutcome1.getTestSteps();
        assertThat(dataDrivenSteps.size(), is(3));

    }
View Full Code Here

Examples of net.thucydides.core.model.TestOutcome

        ThucydidesRunner runner = getNormalTestRunnerUsing(ScenarioWithTestSpecificDataSample.class);

        runner.run(new RunNotifier());

        List<TestOutcome> executedSteps = runner.getTestOutcomes();
        TestOutcome testOutcome1 = executedSteps.get(0);
        List<TestStep> dataDrivenSteps = testOutcome1.getTestSteps();

        TestStep step1 = dataDrivenSteps.get(0);
        TestStep setNameStep1 = step1.getFlattenedSteps().get(0);
        TestStep step2 = dataDrivenSteps.get(1);
        TestStep setNameStep2 = step2.getFlattenedSteps().get(0);
View Full Code Here

Examples of net.thucydides.core.model.TestOutcome

    public ExtendedTemporaryFolder temporaryFolder = new ExtendedTemporaryFolder();

    @Test
    public void should_generate_an_HTML_report_for_an_acceptance_test_run() throws Exception {

        TestOutcome testOutcome = new TestOutcome("a_simple_test_case");
        testOutcome.recordStep(TestStepFactory.successfulTestStepCalled("step 1"));

        File htmlReport = reporter.generateReportFor(testOutcome, allTestOutcomes);

        assertThat(htmlReport.exists(), is(true));
    }
View Full Code Here

Examples of net.thucydides.core.model.TestOutcome

    }

    @Test
    public void should_generate_an_HTML_report_for_an_acceptance_test_run_with_no_steps() throws Exception {

        TestOutcome testOutcome = new TestOutcome("a_simple_test_case");
        testOutcome.recordStep(TestStepFactory.successfulTestStepCalled("step 1"));
        testOutcome.determineTestFailureCause(new AssertionError("test failed"));
        File htmlReport = reporter.generateReportFor(testOutcome, allTestOutcomes);

        assertThat(htmlReport.exists(), is(true));
    }
View Full Code Here

Examples of net.thucydides.core.model.TestOutcome

    }

    @Test
    public void should_generate_an_HTML_report_for_a_failing_manual_acceptance_test() throws Exception {

        TestOutcome testOutcome = new TestOutcome("a_simple_test_case");
        testOutcome.recordStep(TestStepFactory.successfulTestStepCalled("step 1"));
        testOutcome.asManualTest();
        testOutcome.setAnnotatedResult(TestResult.FAILURE);
        File htmlReport = reporter.generateReportFor(testOutcome, allTestOutcomes);

        assertThat(htmlReport.exists(), is(true));
    }
View Full Code Here

Examples of net.thucydides.core.model.TestOutcome

    }

    @Test
    public void should_generate_an_HTML_report_for_an_acceptance_test_run_with_spaces_in_the_test_name() throws Exception {

        TestOutcome testOutcome = new TestOutcome("A simple test case");
        testOutcome.recordStep(TestStepFactory.successfulTestStepCalled("step 1"));

        File htmlReport = reporter.generateReportFor(testOutcome, allTestOutcomes);

        assertThat(htmlReport.getName(), is(Digest.ofTextValue("a_simple_test_case") + ".html"));
    }
View Full Code Here

Examples of net.thucydides.core.model.TestOutcome

    }

    @Test
    public void should_generate_an_HTML_report_for_an_acceptance_test_run_with_an_issue_number_in_the_test_name() throws Exception {

        TestOutcome testOutcome = new TestOutcome("A simple test case (#ISSUE-123)");
        testOutcome.recordStep(TestStepFactory.successfulTestStepCalled("step 1"));

        File htmlReport = reporter.generateReportFor(testOutcome, allTestOutcomes);

        assertThat(htmlReport.getName(), is(Digest.ofTextValue("a_simple_test_case") + ".html"));
    }
View Full Code Here

Examples of net.thucydides.core.model.TestOutcome

    }

    @Test
    public void should_generate_an_HTML_report_for_an_acceptance_test_run_with_issue_numbers_in_the_test_name() throws Exception {

        TestOutcome testOutcome = new TestOutcome("A simple test case (#ISSUE-123, #ISSUE-145)");
        testOutcome.recordStep(TestStepFactory.successfulTestStepCalled("step 1"));

        File htmlReport = reporter.generateReportFor(testOutcome, allTestOutcomes);

        assertThat(htmlReport.getName(), is(Digest.ofTextValue("a_simple_test_case") + ".html"));
    }
View Full Code Here

Examples of net.thucydides.core.model.TestOutcome

        steps.step_one();
        steps.step_two();

        StepEventBus.getEventBus().testFinished(testOutcome);
        StepEventBus.getEventBus().testSuiteFinished();
        TestOutcome outcome = stepListener.getTestOutcomes().get(0);
        assertThat(outcome.getUserStory().getName(), is("My story"));
    }
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.