我是新来TestNG的,我有下面的代码:如何在TestNG的
@BeforeMethod
public void getGroup(ITestAnnotation annotation){
System.out.println("Group Name is --" + annotation.getGroups()) ;
}
@Test(groups = { "MobilSite" })
public void test1(){
System.out.println("I am Running Mobile Site Test");
}
我想,我尝试使用ITestAnnotation
之前方法的组名,但是当我运行测试我我得到以下错误
Method getGroup requires 1 parameters but 0 were supplied in the @Configuration annotation.
你能帮我参数,我应该从XML传递?
从这里学到了很多!谢谢! – drkthng