0
初学者TestNG的随时添加参数错误TestNG的参数失效
请各位高手帮忙看一下
谢谢!!
java代码:
public class NewTest{
@Parameters({"names"})
@Test
public void test(String name){
System.out.println(name);
}
TestNGxml:
异常信息:
org.testng.TestNGException:
Parameter 'names' is required by @Test on method Test
but has not been marked @Optional or defined
in D:\Documents and Settings\huohui\workspace\lianxi\src\test.xml
正确,属性是“value”而不是“values”。 –