| Modifier and Type | Field and Description |
|---|---|
static String |
DEFAULT_FILENAME
The default file name for the TestNG test suite if none is specified (testng.xml).
|
static String |
HTTPS_TESTNG_DTD_URL |
static String |
OLD_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 and Description |
|---|
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. |
| Modifier and Type | Method and Description |
|---|---|
static boolean |
canParse(String fileName) |
static boolean |
hasFileScheme(String uri) |
Collection<XmlSuite> |
parse()
Parses the TestNG test suite and returns the corresponding XmlSuite, and possibly, other
XmlSuite that are pointed to by
<suite-files> tags. |
static Collection<XmlSuite> |
parse(InputStream is,
IPostProcessor processor) |
static Collection<XmlSuite> |
parse(String suite,
IPostProcessor processor) |
List<XmlSuite> |
parseToList() |
void |
setLoadClasses(boolean loadClasses) |
void |
setPostProcessor(IPostProcessor processor) |
public static final String TESTNG_DTD
public static final String OLD_TESTNG_DTD_URL
public static final String TESTNG_DTD_URL
public static final String HTTPS_TESTNG_DTD_URL
public static final String DEFAULT_FILENAME
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()
public Parser(InputStream is)
public void setPostProcessor(IPostProcessor processor)
public void setLoadClasses(boolean loadClasses)
loadClasses - If false, don't try to load the classes during the parsing.public Collection<XmlSuite> parse() throws IOException
<suite-files> tags.IOException - if an I/O error occurs while parsing the test suite file or if the default
testng.xml file is not found.public static boolean hasFileScheme(String uri)
uri - - The uri to be verified.true if the uri has "file:" as its scheme.public List<XmlSuite> parseToList() throws IOException
IOExceptionpublic static Collection<XmlSuite> parse(String suite, IPostProcessor processor) throws IOException
IOExceptionpublic static Collection<XmlSuite> parse(InputStream is, IPostProcessor processor) throws IOException
IOExceptionpublic static boolean canParse(String fileName)
Copyright © 2025. All rights reserved.