What are the benefits of using TestNG with Selenium?

0 votes
May 31 in Selenium by Falguni
118 views

2 answers to this question.

+1 vote
Best answer

Hi Falguni, some of the benefits of using TestNG with Selenium are:

  1. TestNG allows us to execute test cases based on group.

  2. In TestNG Annotations are easy to understand.

  3. Parallel execution of Selenium test cases is possible in TestNG.

  4. Order of execution can be changed

  5. Failed test cases can be executed

  6. Without having main function we can execute the test method.

  7. 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.

answered May 31 by Anvi
• 13,220 points

selected Jun 3 by Abha
0 votes

The main advantage of testNG are as follows:

  1. Provides parallel execution of test methods
  2. Allows to assign priority to test methods
  3. Allows grouping of test methods into test groups
  4. It allows to define dependency of one test method over other method
  5. It allows data driven testing using @DataProvider annotation
  6. Has support for parameterizing test cases using @Parameters annotation
  7. It has different assertions that helps in checking the expected and actual results
  8. Creates detailed (HTML) reports
answered Jun 3 by Rupesh

Related Questions In Selenium

0 votes
1 answer
0 votes
1 answer

What is a Selenium framework and what are the benefits of it?

Hi Disha, Selenium framework is a code structure ...READ MORE

answered May 13 in Selenium by Abha
• 23,960 points
74 views
0 votes
1 answer
0 votes
1 answer

Finding WebDriver element with Class Name in java

The better way to handle this element ...READ MORE

answered Apr 10, 2018 in Selenium by nsv999
• 5,090 points
725 views
0 votes
1 answer
0 votes
1 answer

Geo-location microphone camera pop up

To Allow or Block the notification, access using Selenium and you have to ...READ MORE

answered May 11, 2018 in Selenium by Samarpit
• 5,130 points
982 views
0 votes
1 answer

How to use such xpath to find web elements

It's much simpler to use: #MyDiv123 > div.super or ...READ MORE

answered Jun 14, 2018 in Selenium by Samarpit
• 5,130 points
696 views
0 votes
1 answer

What are the different types of TestNG listeners in Selenium Webdriver?

Hello Jagrati, some of the TestNG listeners ...READ MORE

answered Jun 12 in Selenium by Anvi
• 13,220 points
87 views
0 votes
1 answer