public class JunitTestResultsParser extends DefaultContentHandler
Constructor and Description |
---|
JunitTestResultsParser()
Known ignored elements are:
- properties
- property
- system-err
- system-out
- testsuites
|
Modifier and Type | Method and Description |
---|---|
Set<TestResults> |
getFailedTests() |
int |
getNumberOfErrors()
How many errors did we find in ihe last parsed test report
|
int |
getNumberOfTests()
How many tests did the last parsed test report contain?
|
Set<TestResults> |
getSkippedTests() |
Set<TestResults> |
getSuccessfulTests() |
boolean |
hasErrors() |
void |
parse(InputStream inputStream)
Extract unit test results from the given maven test report.
|
void |
parse(Reader inputReader) |
void |
startElement(String uri,
String localName,
String qName,
Attributes attributes)
Ignore non existing tags
|
characters, endDocument, endElement, endPrefixMapping, hasParserFor, ignorableWhitespace, processingInstruction, registerElementParser, setDocumentLocator, skippedEntity, startDocument, startPrefixMapping
public JunitTestResultsParser()
public void startElement(String uri, String localName, String qName, Attributes attributes) throws SAXException
startElement
in interface ContentHandler
startElement
in class DefaultContentHandler
SAXException
public void parse(@NotNull InputStream inputStream) throws SAXException, IOException
inputStream
- Maven test report (XML) streamSAXException
- if it has trouble parsing the XMLIOException
- if it has trouble reading the filepublic void parse(@NotNull Reader inputReader) throws SAXException, IOException
SAXException
IOException
public boolean hasErrors()
public int getNumberOfErrors()
public int getNumberOfTests()
public Set<TestResults> getSuccessfulTests()
public Set<TestResults> getFailedTests()
public Set<TestResults> getSkippedTests()
Copyright © 2021 Atlassian Software Systems Pty Ltd. All rights reserved.