Package net.thucydides.core.model

Examples of net.thucydides.core.model.TestOutcome.determineTestFailureCause()


                outcome.setTitle(NameConverter.humanize(from.getName()));
                outcome.setDuration(timeAsLong(from.getTime()));

                if (from.getError().isPresent()) {
                    TestException failure = from.getError().get();
                    outcome.determineTestFailureCause(failure.asException());
                } else if (from.getFailure().isPresent()) {
                    TestException failure = from.getFailure().get();
                    outcome.determineTestFailureCause(failure.asAssertionFailure());
                } else if (from.getSkipped().isPresent()) {
                    //although it is logged by junit as 'skipped', Thucydides
View Full Code Here


                if (from.getError().isPresent()) {
                    TestException failure = from.getError().get();
                    outcome.determineTestFailureCause(failure.asException());
                } else if (from.getFailure().isPresent()) {
                    TestException failure = from.getFailure().get();
                    outcome.determineTestFailureCause(failure.asAssertionFailure());
                } else if (from.getSkipped().isPresent()) {
                    //although it is logged by junit as 'skipped', Thucydides
                    //makes a distinction between skipped and ignored.
                    //outcome.setAnnotatedResult(TestResult.IGNORED);
View Full Code Here

    @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

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.