public void testFailure()

in wilma-functionaltest/src/main/java/com/epam/gepard/logger/XmlRunReporter.java [165:192]


    public void testFailure(final Failure failure) throws Exception {
        String name = failure.getDescription().getDisplayName();
        TestInfo info = testCases.get(name);
        Element fe;
        if (!(failure.getException() instanceof AssertionError)) {
            fe = doc.createElement("error");
            fe.setAttribute("message", failure.getMessage());
            fe.setAttribute("type", failure.getException().getClass().getName());
            errors.incrementAndGet();
        } else {
            AssertionError ae = (AssertionError) failure.getException();
            if (handleIgnore && (ae.getCause() instanceof NATestCaseException)) {
                fe = doc.createElement("ignore");
                fe.setAttribute("message", ae.getCause().getMessage());
                fe.setAttribute("type", ae.getCause().getClass().getName());
                ignores.incrementAndGet();
            } else {
                fe = doc.createElement("failure");
                fe.setAttribute("message", failure.getMessage());
                fe.setAttribute("type", failure.getException().getClass().getName());
                failures.incrementAndGet();
            }
        }
        fe.appendChild(doc.createTextNode(failure.getTrace()));
        if (info != null) {
            info.element.appendChild(fe);
        }
    }