下面列出了org.testng.ITestNGMethod#isTest ( ) 实例代码,或者点击链接到github查看源代码,也可以在右侧发表评论。
private void addPendingMethods(ITestContext iTestContext) {
for (ITestNGMethod method : iTestContext.getExcludedMethods()) {
if (method.isTest() && !method.getEnabled() && isInActiveGroup(method, iTestContext)) {
Description description = new Description().withValue(method.getDescription());
String suiteUid = getSuiteUid(iTestContext);
TestCaseStartedEvent event = new TestCaseStartedEvent(suiteUid, method.getMethodName());
if (description.getValue() != null) {
event.setDescription(description);
}
Annotation[] annotations = method.getConstructorOrMethod().getMethod().getAnnotations();
AnnotationManager am = new AnnotationManager(annotations);
am.setDefaults(method.getInstance().getClass().getAnnotations());
am.update(event);
getLifecycle().fire(event);
getLifecycle().fire(new TestCasePendingEvent());
fireFinishTest();
}
}
}
public static Method findDataSupplier(final ITestNGMethod testMethod) {
var annotationMetaData = testMethod.isTest()
? getTestAnnotationMetaData(testMethod)
: getFactoryAnnotationMetaData(testMethod);
return getDataSupplierMethod(annotationMetaData._1, annotationMetaData._2);
}