@Override public boolean isAfterGroupsConfiguration() { return testNGMethod.isAfterGroupsConfiguration(); }
@Override public boolean isAfterGroupsConfiguration() { return testNGMethod.isAfterGroupsConfiguration(); }
boolean as = tm.isAfterSuiteConfiguration(); boolean bg = tm.isBeforeGroupsConfiguration(); boolean ag = tm.isAfterGroupsConfiguration(); boolean setUp = tm.isBeforeMethodConfiguration(); boolean tearDown = tm.isAfterMethodConfiguration();
boolean as = tm.isAfterSuiteConfiguration(); boolean bg = tm.isBeforeGroupsConfiguration(); boolean ag = tm.isAfterGroupsConfiguration(); boolean setUp = tm.isBeforeMethodConfiguration(); boolean tearDown = tm.isAfterMethodConfiguration();
/** * * A helper method that checks to see if a method is a configuration method or not. * @param method - A {@link ITestNGMethod} object which needs to be checked. * @param includeGroupConfigs - <code>true</code> if before/after group configuration annotations are also to * be taken into consideration. * @return - <code>true</code> if the method is a configuration method and false if its a test method. */ private static boolean isConfigurationMethod(ITestNGMethod method, boolean includeGroupConfigs) { boolean flag = method.isBeforeMethodConfiguration() || method.isAfterMethodConfiguration() || method.isBeforeTestConfiguration() || method.isAfterTestConfiguration() || method.isBeforeClassConfiguration() || method.isAfterClassConfiguration() || method.isBeforeSuiteConfiguration() || method.isAfterSuiteConfiguration(); if (includeGroupConfigs) { flag = flag || method.isBeforeGroupsConfiguration() || method.isAfterGroupsConfiguration(); } return flag; }
return 5; if(method.isAfterGroupsConfiguration()) { return 4;
return "@AfterMethod"; if(method.isAfterGroupsConfiguration()) { return "@AfterGroups";
/** * A helper method that checks to see if a method is a configuration method or not. * * @param method - A {@link ITestNGMethod} object which needs to be checked. * @param includeGroupConfigs - <code>true</code> if before/after group configuration annotations * are also to be taken into consideration. * @return - <code>true</code> if the method is a configuration method and false if its a test * method. */ private static boolean isConfigurationMethod(ITestNGMethod method, boolean includeGroupConfigs) { boolean flag = method.isBeforeMethodConfiguration() || method.isAfterMethodConfiguration() || method.isBeforeTestConfiguration() || method.isAfterTestConfiguration() || method.isBeforeClassConfiguration() || method.isAfterClassConfiguration() || method.isBeforeSuiteConfiguration() || method.isAfterSuiteConfiguration(); if (includeGroupConfigs) { flag = flag || method.isBeforeGroupsConfiguration() || method.isAfterGroupsConfiguration(); } return flag; }
return 5; if (method.isAfterGroupsConfiguration()) { return 4;
return "@AfterMethod"; if (method.isAfterGroupsConfiguration()) { return "@AfterGroups";
@Override public boolean isAfterGroupsConfiguration() { return delegate.isAfterGroupsConfiguration(); }
@Override public boolean isAfterGroupsConfiguration() { return delegate.isAfterGroupsConfiguration(); }
@Override public boolean isAfterGroupsConfiguration() { return method.isAfterGroupsConfiguration(); }
} else if (method.isAfterMethodConfiguration()) { buf.append("@AfterMethod "); } else if (method.isAfterGroupsConfiguration()) { buf.append("@AfterGroups "); } else if (method.isAfterClassConfiguration()) {
@Override public boolean includeMethod( IMethodSelectorContext context, ITestNGMethod testngMethod, boolean isTestMethod ) { return testngMethod.isBeforeClassConfiguration() || testngMethod.isBeforeGroupsConfiguration() || testngMethod.isBeforeMethodConfiguration() || testngMethod.isBeforeSuiteConfiguration() || testngMethod.isBeforeTestConfiguration() || testngMethod.isAfterClassConfiguration() || testngMethod.isAfterGroupsConfiguration() || testngMethod.isAfterMethodConfiguration() || testngMethod.isAfterSuiteConfiguration() || testngMethod.isAfterTestConfiguration() || shouldRun( testngMethod ); }
@Override public boolean includeMethod( IMethodSelectorContext context, ITestNGMethod testngMethod, boolean isTestMethod ) { return testngMethod.isBeforeClassConfiguration() || testngMethod.isBeforeGroupsConfiguration() || testngMethod.isBeforeMethodConfiguration() || testngMethod.isBeforeSuiteConfiguration() || testngMethod.isBeforeTestConfiguration() || testngMethod.isAfterClassConfiguration() || testngMethod.isAfterGroupsConfiguration() || testngMethod.isAfterMethodConfiguration() || testngMethod.isAfterSuiteConfiguration() || testngMethod.isAfterTestConfiguration() || shouldRun( testngMethod ); }
} else if (method.isAfterClassConfiguration()) { return AFTER_CLASS; } else if (method.isAfterGroupsConfiguration()) { return AFTER_GROUPS; } else if (method.isAfterMethodConfiguration()) {
} else if (result.getMethod().isAfterTestConfiguration()) { type = AFTER_TEST; } else if (result.getMethod().isAfterGroupsConfiguration()) { type = AFTER_GROUP; } else if (result.getMethod().isAfterClassConfiguration()) {
/** * Detect and save all test method types. * * @param method the method * @param methodResult the method result */ protected void saveMethodTypes(TestMethod method, ITestResult methodResult) { ITestNGMethod m = methodResult.getMethod(); if (m.isAfterClassConfiguration()) saveMethodType(method, EMethodType.AFTER_CLASS); if (m.isAfterGroupsConfiguration()) saveMethodType(method, EMethodType.AFTER_GROUP); if (m.isAfterMethodConfiguration()) saveMethodType(method, EMethodType.AFTER_METHOD); if (m.isAfterSuiteConfiguration()) saveMethodType(method, EMethodType.AFTER_SUITE); if (m.isAfterTestConfiguration()) saveMethodType(method, EMethodType.AFTER_TEST); if (m.isBeforeClassConfiguration()) saveMethodType(method, EMethodType.BEFORE_CLASS); if (m.isBeforeGroupsConfiguration()) saveMethodType(method, EMethodType.BEFORE_GROUP); if (m.isBeforeMethodConfiguration()) saveMethodType(method, EMethodType.BEFORE_METHOD); if (m.isBeforeSuiteConfiguration()) saveMethodType(method, EMethodType.BEFORE_SUITE); if (m.isBeforeTestConfiguration()) saveMethodType(method, EMethodType.BEFORE_TEST); }
return ConfigMethodType.AFTER_CLASS; if (iTestResult.getMethod().isAfterGroupsConfiguration()) { return ConfigMethodType.AFTER_GROUPS;