What are the benefits of using TestNG with Selenium

0 votes
May 31, 2019 in Selenium by Falguni
1,757 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, 2019 by Anvi
• 14,150 points

selected Jun 3, 2019 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, 2019 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, 2019 in Selenium by Abha
• 28,140 points
1,134 views
0 votes
1 answer
0 votes
2 answers

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,500 points
13,776 views
0 votes
2 answers

Problem while using InternetExplorerDriver in Selenium WebDriver

enable trusted connection  in internet explorer by ...READ MORE

answered Aug 31, 2020 in Selenium by Sri
• 3,190 points
9,189 views
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,910 points
7,266 views
0 votes
2 answers

How to use such xpath to find web elements

xpath are two types. 1) Absolute XPath:    /html/b ...READ MORE

answered Sep 3, 2020 in Selenium by Sri
• 3,190 points
7,902 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, 2019 in Selenium by Anvi
• 14,150 points
1,836 views
0 votes
1 answer

What are the benefits and drawbacks of using Test Driven Development in Automation testing?

Hi Sharon, Test Driven Development (TDD) is an iterative ...READ MORE

answered Aug 5, 2019 in Selenium by Anvi
• 14,150 points
2,470 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP