What is parameterization in testng? How to pass parameters using testng.xml?



What is parameterization in testng? How to pass parameters using testng.xml?..

Answer / Vineet Tyagi

Parameterization in TestNG allows the reuse of test methods with different sets of data. This is achieved by defining a Test Method with parameters and then providing the required values through an XML file (testng.xml). Each set of parameter values is called a Test Data Set. To pass parameters, you need to define a `<parameters>` tag in the testng.xml file and map it with the corresponding method parameter using the `dataProvider=` attribute in your @Test methods.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Selenium Interview Questions

How to check if a text is highlighted on the page ?

1 Answers  


What is the difference between driver.findelement() and driver.findelements() commands?

1 Answers  


How can you redirect browsing from a browser through some proxy?

1 Answers  


Name the different types of waits in webdriver.

1 Answers  


How can you find broken links in a page using selenium webdriver?

1 Answers  


How to submit a form using selenium webdriver?

1 Answers  


How do you clear the contents of a textbox in selenium?

1 Answers  


Explain what are the junits annotation linked with selenium?

1 Answers  


Which of the selector ID, name, XPath or CSS should I use?

1 Answers  


Tell us how many exceptions do you know in selenium webdriver?

1 Answers  


What are its advantages of pom?

1 Answers  


What are the important selenium ide commands or selenese commands?

1 Answers  


Categories