Hi Falguni, some of the benefits of using TestNG with Selenium are:
-
TestNG allows us to execute test cases based on group.
-
In TestNG Annotations are easy to understand.
-
Parallel execution of Selenium test cases is possible in TestNG.
-
Order of execution can be changed
-
Failed test cases can be executed
-
Without having main function we can execute the test method.
-
An xml file can be generated to execute the entire test suite. In that xml file we can rearrange our execution order and we can also skip the execution of particular test case.