For some reason I have to use old TestNG library which doesn't have "getCurrentXmlTest()).getAllParameters()"
API
How should I get all TestXML parameter using testng-5.4-jdk15.jar
For latest TestNG version, this is how we get all params but how can I simulate such a code using testng-5.4-jdk15.jar
@DataProvider(name = "DataFile")
public Object[][] testdata(ITestContext context) {
Map<String, String> parameters = (((ITestContext)context).getCurrentXmlTest())
.getAllParameters();
return new Object[][] { { parameters } };
}
P.S. :- I can't upgrade jar :(