|
||||||||||
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 String |
DEFAULT_FILENAME
The default file name for the TestNG test suite if none is specified (testng.xml). |
static String |
DEPRECATED_TESTNG_DTD_URL
The URL to the deprecated TestNG DTD. |
static String |
TESTNG_DTD
The name of the TestNG DTD. |
static 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(InputStream is)
|
|
Parser(String fileName)
Constructs a Parser to use the inputStream as the source of
the xml test suite to parse. |
Method Summary | |
---|---|
Collection<XmlSuite> |
parse()
Parses the TestNG test suite and returns the corresponding XmlSuite, and possibly, other XmlSuite that are pointed to by |
List<XmlSuite> |
parseToList()
|
void |
setLoadClasses(boolean loadClasses)
If false, don't try to load the classes during the parsing. |
void |
setPostProcessor(IPostProcessor processor)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String TESTNG_DTD
public static final String DEPRECATED_TESTNG_DTD_URL
public static final String TESTNG_DTD_URL
public static final String DEFAULT_FILENAME
Constructor Detail |
---|
public Parser(String fileName)
Parser
to use the inputStream as the source of
the xml test suite to parse.
fileName
- the filename corresponding to the inputStream or null if
unknown.public Parser() throws FileNotFoundException
FileNotFoundException
- if the DEFAULT_FILENAME resource is not
found in the classpath.public Parser(InputStream is)
Method Detail |
---|
public void setPostProcessor(IPostProcessor processor)
public void setLoadClasses(boolean loadClasses)
public Collection<XmlSuite> parse() throws ParserConfigurationException, SAXException, IOException
ParserConfigurationException
SAXException
IOException
- if an I/O error occurs while parsing the test suite file or
if the default testng.xml file is not found.public List<XmlSuite> parseToList() throws ParserConfigurationException, SAXException, IOException
ParserConfigurationException
SAXException
IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |