adspace


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

Answer Posted / 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       View All Answers


Please Help Members By Posting Answers For Below Questions

What’s selenese?

920


Do you know how to locate a link using its text in selenium?

986


what will be the first salary and what will be the hike in the salary?

929


How can you fetch an attribute from an element? How to retrieve typed text from a textbox?

1197


Have you created any framework?

1039