Class Parser


  • public class Parser
    extends Object
    Parser is a parser for a TestNG XML test suite file.
    • Field Detail

      • DEPRECATED_TESTNG_DTD_URL

        public static final String DEPRECATED_TESTNG_DTD_URL
        The URL to the deprecated TestNG DTD.
        See Also:
        Constant Field Values
      • DEFAULT_FILENAME

        public static final String DEFAULT_FILENAME
        The default file name for the TestNG test suite if none is specified (testng.xml).
        See Also:
        Constant Field Values
    • Constructor Detail

      • Parser

        public Parser​(String fileName)
        Constructs a Parser to use the inputStream as the source of the xml test suite to parse.
        Parameters:
        fileName - the filename corresponding to the inputStream or null if unknown.
      • Parser

        public Parser()
               throws FileNotFoundException
        Creates a parser that will try to find the DEFAULT_FILENAME from the jar.
        Throws:
        FileNotFoundException - if the DEFAULT_FILENAME resource is not found in the classpath.