初学者testng总是加参数报错
请高手帮忙看看
谢谢!!
java代码:</p>
public class NewTest{
@Parameters({"names"})
@Test
public void test(String name){
System.out.println(name);
}
测试NGxml:</p>
<suite name="Suite" parallel="false">
<parameter name="names" values="aaaaaaaaaa"></parameter>
<test name="Test">
<classes>
<class name="com.test.NewTest"/>
</classes>
</test>
</suite>
异常信息:</p>
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