Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix SAX bug #642

Merged
merged 1 commit into from May 24, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Expand Up @@ -131,6 +131,8 @@ public void startElement(String uri, String localName, String qName, Attributes
classesToSuitesIndex.put(defaultSuite.getFullClassName(), suites.size() - 1);
break;
case "testcase":
// Although this element does not contain any text, this line must be retained because the
// nested elements do have text content.
currentElement = new StringBuilder();

testCase = new ReportTestCase().setName(attributes.getValue("name"));
Expand Down Expand Up @@ -162,10 +164,14 @@ public void startElement(String uri, String localName, String qName, Attributes
}
break;
case "failure":
currentElement = new StringBuilder();

testCase.setFailure(attributes.getValue("message"), attributes.getValue("type"));
currentSuite.incrementNumberOfFailures();
break;
case "error":
currentElement = new StringBuilder();

testCase.setError(attributes.getValue("message"), attributes.getValue("type"));
currentSuite.incrementNumberOfErrors();
break;
Expand All @@ -181,6 +187,9 @@ public void startElement(String uri, String localName, String qName, Attributes
case "failsafe-summary":
valid = false;
break;
case "time":
currentElement = new StringBuilder();
break;
default:
break;
}
Expand Down