void (String uri, String localName, String qName) { final String currentText = StringUtil.unescapeXmlEntities(currentValue.toString()); final boolean isTestOutput = myCurrentTest == null || TestResultsXmlFormatter.STATUS_PASSED.equals(myStatus) || !myErrorOutput; if (isTestOutput) { currentValue.setLength(0); } if (TestResultsXmlFormatter.ELEM_SUITE.equals(qName)) { myProcessor.onSuiteFinished(new TestSuiteFinishedEvent(mySuites.pop())); } else if (TestResultsXmlFormatter.ELEM_TEST.equals(qName)) { final boolean isError = TestResultsXmlFormatter.STATUS_ERROR.equals(myStatus); if (TestResultsXmlFormatter.STATUS_FAILED.equals(myStatus) || isError) { myProcessor.onTestFailure(new TestFailedEvent(myCurrentTest, "", currentText, isError, myActual, myExpected)); } else if (TestResultsXmlFormatter.STATUS_IGNORED.equals(myStatus) || TestResultsXmlFormatter.STATUS_SKIPPED.equals(myStatus)) { myProcessor.onTestIgnored(new TestIgnoredEvent(myCurrentTest, "", currentText) { @NotNull @Override public String getIgnoreComment() { return ""; } }); } myProcessor.onTestFinished(new TestFinishedEvent(myCurrentTest, myDuration != null ? Long.parseLong(myDuration) : -1)); if (!TestResultsXmlFormatter.STATUS_PASSED.equals(myStatus)) { currentValue.setLength(0); } myCurrentTest = null; myActual = null; myExpected = null; } else if (TestResultsXmlFormatter.ELEM_OUTPUT.equals(qName) && !StringUtil.isEmpty(currentText) && isTestOutput) { if (myCurrentTest != null) { myProcessor.onTestOutput(new TestOutputEvent(myCurrentTest, currentText, !myErrorOutput)); } else { myProcessor.onUncapturedOutput(currentText, myErrorOutput ? ProcessOutputTypes.STDERR : ProcessOutputTypes.STDOUT); } } }