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:
org.xml.sax.ContentHandler
,org.xml.sax.DTDHandler
,org.xml.sax.EntityResolver
,org.xml.sax.ErrorHandler
public class TestcaseSummaryParser extends org.xml.sax.helpers.DefaultHandler
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.- Author:
- FInfantino, PikeTec GmbH
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
characters(char[] ac, int i, int j)
void
endElement(java.lang.String uri, java.lang.String localName, java.lang.String qName)
static java.util.List<Testcase>
parseXml(FilePath xmlFile)
Parse an XML file to retrieve a testcase info instance (non null)void
startElement(java.lang.String s, java.lang.String s1, java.lang.String elementName, org.xml.sax.Attributes attributes)
-
-
-
Method Detail
-
parseXml
public static java.util.List<Testcase> parseXml(FilePath xmlFile) throws java.io.IOException, java.lang.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:
java.io.IOException
- if the xml file cannot be read or has a wrong formatjava.lang.InterruptedException
- If the Job is cancelled
-
startElement
public void startElement(java.lang.String s, java.lang.String s1, java.lang.String elementName, org.xml.sax.Attributes attributes) throws org.xml.sax.SAXException
- Specified by:
startElement
in interfaceorg.xml.sax.ContentHandler
- Overrides:
startElement
in classorg.xml.sax.helpers.DefaultHandler
- Throws:
org.xml.sax.SAXException
-
endElement
public void endElement(java.lang.String uri, java.lang.String localName, java.lang.String qName) throws org.xml.sax.SAXException
- Specified by:
endElement
in interfaceorg.xml.sax.ContentHandler
- Overrides:
endElement
in classorg.xml.sax.helpers.DefaultHandler
- Throws:
org.xml.sax.SAXException
-
characters
public void characters(char[] ac, int i, int j) throws org.xml.sax.SAXException
- Specified by:
characters
in interfaceorg.xml.sax.ContentHandler
- Overrides:
characters
in classorg.xml.sax.helpers.DefaultHandler
- Throws:
org.xml.sax.SAXException
-
-