Package net.thucydides.core.reports.adaptors.xunit.model

Examples of net.thucydides.core.reports.adaptors.xunit.model.TestException


                TestOutcome outcome = TestOutcome.forTestInStory(from.getName(), Story.called(from.getClassname()));
                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
                    //makes a distinction between skipped and ignored.
                    //outcome.setAnnotatedResult(TestResult.IGNORED);
View Full Code Here


            NodeList failureElements = testCaseElement.getElementsByTagName(exceptionType);
            if (failureElements.getLength() > 0) {
                Element failureElement = (Element) failureElements.item(0);
                String message = failureElement.getAttribute("message");
                String errorOutput = failureElement.getTextContent();
                return Optional.of(new TestException(message, errorOutput, exceptionType));
            }
            return Optional.absent();
        }
View Full Code Here

TOP

Related Classes of net.thucydides.core.reports.adaptors.xunit.model.TestException

Copyright © 2018 www.massapicom. 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.