What does Parameterized testing mean in TestNG?

0 votes
Jun 4, 2019 in Selenium by Imraan
57 views

1 answer to this question.

0 votes

Hey Imraan, Parameterized tests allow developers to run the same test over and over again using different values. There are two ways to set these parameters:

  • with testng.xml: With this technique, you define the simple parameters in the testng.xml file and then reference those parameters in the source files.You need to use the @Parameters annotation for passing parameter values to the test method:
    @Parameters({ "param-name" })
  • with Data Providers: When you need to pass complex parameters or parameters that need to be created from Java (complex objects, objects read from a property file or a database, etc.), parameters can be passed using Dataproviders.A Data Provider is a method annotated with @DataProvider.
     
answered Jun 4, 2019 by Parineeti

Related Questions In Selenium

0 votes
1 answer

What purpose does this "::" solve in selenium?

Well this is not a Selenium functionality, ...READ MORE

answered Apr 18, 2018 in Selenium by king_kenny
• 3,710 points
33 views
0 votes
1 answer

What is the role of TestNG & JUnit frameworks in Selenium?

Well TestNG and JUnit are test frameworks ...READ MORE

answered Apr 18, 2018 in Selenium by king_kenny
• 3,710 points
553 views
0 votes
2 answers
0 votes
1 answer

What is TestNG and why it is used in selenium?

Hello @User, Talking about TestNG, it is an ...READ MORE

answered Dec 24, 2018 in Selenium by Shuvodip
210 views
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,510 points
2,142 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,870 points
1,790 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,870 points
1,748 views
0 votes
1 answer

What does the test timeout mean in TestNG?

Hi Wahida, test timeout represents the maximum ...READ MORE

answered Jun 19, 2019 in Selenium by Abha
• 27,800 points
74 views
0 votes
1 answer

What is the use of @listener annotation in TestNG?

 @listeners are used to configure reports and ...READ MORE

answered Jan 2, 2019 in Selenium by Shuvodip
751 views