Package com.piketec.jenkins.plugins.tpt
Class TestcaseSummaryParser
java.lang.Object
org.xml.sax.helpers.DefaultHandler
com.piketec.jenkins.plugins.tpt.TestcaseSummaryParser
- All Implemented Interfaces:
ContentHandler
,DTDHandler
,EntityResolver
,ErrorHandler
This class is similar to the TestcaseParser. The difference is that this is used when an
Execution Error in TPT occurs and no testcase_infomation.xml are available. In such case the
test_summary.xml will be parsed and all testcases will be marked as execution errors.
Additonally global assesslet results are only available here.
- Author:
- FInfantino, Synopsys Inc.
-
Method Summary
Modifier and TypeMethodDescriptionvoid
characters
(char[] ac, int i, int j) void
endElement
(String uri, String localName, String qName) static com.piketec.jenkins.plugins.tpt.TestCasesParseResult
Parse an XML file to retrieve a testcase info instance (non null)void
startElement
(String s, String s1, String elementName, Attributes attributes) Methods inherited from class org.xml.sax.helpers.DefaultHandler
endDocument, endPrefixMapping, error, fatalError, ignorableWhitespace, notationDecl, processingInstruction, resolveEntity, setDocumentLocator, skippedEntity, startDocument, startPrefixMapping, unparsedEntityDecl, warning
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.xml.sax.ContentHandler
declaration
-
Method Details
-
parseXml
public static com.piketec.jenkins.plugins.tpt.TestCasesParseResult parseXml(FilePath xmlFile) throws IOException, InterruptedException Parse an XML file to retrieve a testcase info instance (non null)- Parameters:
xmlFile
- test_summary.xml- Returns:
- A testcase, filled with the content of the xml-file. Result is allways Execution Error.
- Throws:
IOException
- if the xml file cannot be read or has a wrong formatInterruptedException
- If the Job is cancelled
-
startElement
public void startElement(String s, String s1, String elementName, Attributes attributes) throws SAXException - Specified by:
startElement
in interfaceContentHandler
- Overrides:
startElement
in classDefaultHandler
- Throws:
SAXException
-
endElement
- Specified by:
endElement
in interfaceContentHandler
- Overrides:
endElement
in classDefaultHandler
- Throws:
SAXException
-
characters
- Specified by:
characters
in interfaceContentHandler
- Overrides:
characters
in classDefaultHandler
- Throws:
SAXException
-