public void endElement()

in surefire-report-parser/src/main/java/org/apache/maven/plugins/surefire/report/TestSuiteXmlParser.java [219:257]


    public void endElement(String uri, String localName, String qName) throws SAXException {
        switch (qName) {
            case "testcase":
                currentSuite.getTestCases().add(testCase);
                break;
            case "failure":
            case "error":
                testCase.setFailureDetail(currentElement.toString())
                        .setFailureErrorLine(parseErrorLine(currentElement, testCase.getFullClassName()));
                break;
            case "time":
                try {
                    defaultSuite.setTimeElapsed(Float.parseFloat(currentElement.toString()));
                } catch (NumberFormatException e) {
                    throw new SAXException("Failed to parse time value", e);
                }
                break;
            case "flakyFailure":
                testCase.addFlakyFailure(testCaseFlakyFailure);
                testCaseFlakyFailure = null;
                break;
            case "flakyError":
                testCase.addFlakyError(testCaseFlakyError);
                testCaseFlakyError = null;
                break;
            case "stackTrace":
                if (testCaseFlakyFailure != null) {
                    testCaseFlakyFailure.setStackTrace(currentElement.toString());
                }
                if (testCaseFlakyError != null) {
                    testCaseFlakyError.setStackTrace(currentElement.toString());
                }
                break;
            default:
                break;
        }
        parseContent = false;
        // TODO extract real skipped reasons
    }