public class DP
{
@DataProvider (name = "data-provider")
public Object[][] dpMethod(){
return new Object[][] {{"First-Value"}, {"Second-Value"}};
}
@Test (dataProvider = "data-provider")
public void myTest (String val) {
System.out.println("Passed Parameter Is : " + val);
}
}
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter