1
我想获得每次运行测试类时执行的测试方法。我用下面的代码有没有什么办法可以从`org.testng.ITestResult`` ITestNGMethod`转换为`java.lang.reflect.Method`
@AfterMethod
public void logout(ITestResult result){
Method method=result.getMethod(); //compliation error- Type mismatch: cannot convert from ITestNGMethod to Method
readAnnotation(method);
}
有没有办法从org.testng.ITestResult
ITestNGMethod
转换为java.lang.reflect.Method