我想将参数传递给testng类。 我有一个变量tc1.featureFileName,tc1.fieldValueMap如何将对象/参数传递给Testng
我已经解析名称C2中的TC对象,但我不知道如何通过 tc1.fieldValueMap其中包含的输入变量的HashMap来TestNG的。
Class c2 = Class.forName("com.Scenarios."+tc1.featureFileName);
TestListenerAdapter tla = new TestListenerAdapter();
TestNG testng = new TestNG();
testng.setTestClasses(new Class[] {c2});
testng.addListener(tla);
testng.run();
虽然这个问题不是很清楚,但http://testng.org/doc/documentation-main.html#parameters可以帮助 – nullpointer