Package hudson.plugins.testng.parser
Class ResultsParser
- java.lang.Object
-
- hudson.plugins.testng.parser.ResultsParser
-
public class ResultsParser extends Object
Parses TestNG result XMLs generated using org.testng.reporters.XmlReporter into objects that are then used to display results in Jenkins.(For those trying to modify this class, pay attention to logging. We are using two different loggers. If build's
PrintStream
is not available, we log usingLogger
. Also, logging is done only using thelog(String)
andlog(Exception)
methods.)Note that instances of this class are not thread-safe to use!
- Author:
- nullin
-
-
Field Summary
Fields Modifier and Type Field Description static String
DATE_FORMAT
static org.xmlpull.v1.XmlPullParserFactory
PARSER_FACTORY
-
Constructor Summary
Constructors Constructor Description ResultsParser()
ResultsParser(PrintStream logger)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description TestNGResult
parse(FilePath[] paths)
Parses the XML for relevant information
-
-
-
Field Detail
-
DATE_FORMAT
public static final String DATE_FORMAT
- See Also:
- Constant Field Values
-
PARSER_FACTORY
public static final org.xmlpull.v1.XmlPullParserFactory PARSER_FACTORY
-
-
Constructor Detail
-
ResultsParser
public ResultsParser()
-
ResultsParser
public ResultsParser(PrintStream logger)
-
-
Method Detail
-
parse
public TestNGResult parse(FilePath[] paths)
Parses the XML for relevant information- Parameters:
paths
- a file hopefully containing test related data in correct format- Returns:
- a collection of test results
-
-