how to use parameter sin testng in xml code example
Example 1: how to pass parameter in test case through testng.xml
We use @Parameter annotation.
Let's say we create a class and we put the @Parameter annotation with
"param-name".
Then we open testng.xml file. We create a suite, it takes also parameter name
attribute. We provide a parameter name which we named in class and we provide
value what we want to pass.
Example 2: passing parameters in testng
We use @Parameter annotation.
Let's say we create a class and we put the @Parameter annotation with
"param-name".
Then we open testng.xml file. We create a suite, it takes also parameter name
attribute. We provide a parameter name which we named in class and we provide
value what we want to pass.