1.

What is the significance of testng.xml?

Answer»

Selenium does not support report generation and test case management, we use the TESTNG framework with selenium to support these features. TestNG is more advanced than JUnit and implementation of annotations is easy. 

The test suite is not defined in TESTING source code and it is represented in an XML file because the suite is a COLLECTION of test cases and an execution is the feature of the test suite.

To execute test cases in a suite or group of test cases, you need to create a testng.xml file. The testng.xml file contains the NAME of all classes and methods that needs to be executed as a PART of execution flow.

Advantages of using testng.xml file are -

  1. The execution of multiple test cases from multiple classes is allowed.
  2. Parallel execution is allowed.
  3. Execution of test cases in groups, where a single test can belong to multiple groups is allowed.


Discussion

No Comment Found