|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.testng.xml.Parser
public class Parser
Parser is a parser for a TestNG XML test suite file.
| Field Summary | |
|---|---|
static java.lang.String |
DEFAULT_FILENAME
The default file name for the TestNG test suite if none is specified (testng.xml). |
static java.lang.String |
DEPRECATED_TESTNG_DTD_URL
The URL to the deprecated TestNG DTD. |
static java.lang.String |
TESTNG_DTD
The name of the TestNG DTD. |
static java.lang.String |
TESTNG_DTD_URL
The URL to the TestNG DTD. |
| Constructor Summary | |
|---|---|
Parser()
Creates a parser that will try to find the DEFAULT_FILENAME from the jar. |
|
Parser(java.io.InputStream inputStream)
Constructs a Parser to use the inputStream as the source of
the xml test suite to parse. |
|
Parser(java.lang.String fileName)
create a parser that works on a given file. |
|
| Method Summary | |
|---|---|
java.util.Collection<XmlSuite> |
parse()
Parses the TestNG test suite and returns the corresponding XmlSuite, and possibly, other XmlSuite that are pointed to by |
java.util.List<XmlSuite> |
parseToList()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String TESTNG_DTD
public static final java.lang.String DEPRECATED_TESTNG_DTD_URL
public static final java.lang.String TESTNG_DTD_URL
public static final java.lang.String DEFAULT_FILENAME
| Constructor Detail |
|---|
public Parser(java.lang.String fileName)
throws java.io.FileNotFoundException
fileName - the filename of the xml suite to parse.
java.io.FileNotFoundException - if the fileName is not found.public Parser(java.io.InputStream inputStream)
Parser to use the inputStream as the source of
the xml test suite to parse.
inputStream - the xml test suite input stream.
public Parser()
throws java.io.FileNotFoundException
java.io.FileNotFoundException - if the DEFAULT_FILENAME resource is not
found in the classpath.| Method Detail |
|---|
public java.util.Collection<XmlSuite> parse()
throws javax.xml.parsers.ParserConfigurationException,
org.xml.sax.SAXException,
java.io.IOException
javax.xml.parsers.ParserConfigurationException
org.xml.sax.SAXException
java.io.IOException - if an I/O error occurs while parsing the test suite file or
if the default testng.xml file is not found.
public java.util.List<XmlSuite> parseToList()
throws javax.xml.parsers.ParserConfigurationException,
org.xml.sax.SAXException,
java.io.IOException
javax.xml.parsers.ParserConfigurationException
org.xml.sax.SAXException
java.io.IOException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||