I am using parameters in my testng.xml file like this
<parameter name="name" value="value" />
But I want that parameter to get the value of a command line argument from my main method.
public static void main(String[] args) {
TestNG runner = new TestNG();
List<String> suitefiles = new ArrayList<String>();
suitefiles.add(args[0]);
runner.setTestSuites(suitefiles);
runner.run();
}
How can I do it?