我是新來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