Skip to content

Commit

Permalink
fix SAX bug
Browse files Browse the repository at this point in the history
  • Loading branch information
michael-o committed May 22, 2023
1 parent e27ff14 commit 676c9bd
Showing 1 changed file with 7 additions and 2 deletions.
Expand Up @@ -131,8 +131,6 @@ public void startElement(String uri, String localName, String qName, Attributes
classesToSuitesIndex.put(defaultSuite.getFullClassName(), suites.size() - 1);
break;
case "testcase":
currentElement = new StringBuilder();

testCase = new ReportTestCase().setName(attributes.getValue("name"));

String fullClassName = attributes.getValue("classname");
Expand Down Expand Up @@ -162,10 +160,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 +183,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

0 comments on commit 676c9bd

Please sign in to comment.