TestNG is a testing framework designed to simplify the testing needs.
Quick overview of TestNG.xml file
- A suite is an xml file represented by <suite> tag. The TestNG suite can contain one or more TestNG tests
- A test is represented by the <test> tag. A TestNG test can contain one or more TestNG classes
- A class is a java class having TestNG annotations. It is represented by the <class> tag. A TestNG class can contain one or more TestNG methods
- A method is method configured with @Test annotation
Sample TestNG.xml file
Also, it is possible to use packages instead of classes in TestNG.xml file. For this package tag is used as shown below: