@Override public boolean includeMethod(IMethodSelectorContext context, ITestNGMethod method, boolean isTestMethod) { context.setStopped(true); return true; }
/** * @return true as soon as we fond a Method Selector that returns * true for the method "tm". */ public boolean includeMethod(ITestNGMethod tm, boolean isTestMethod) { Collections.sort(m_methodSelectors); boolean foundNegative = false; IMethodSelectorContext context = new DefaultMethodSelectorContext(); boolean result = false; for (MethodSelectorDescriptor mds : m_methodSelectors) { // If we found any negative priority, we break as soon as we encounter // a selector with a positive priority if (! foundNegative) { foundNegative = mds.getPriority() < 0; } if (foundNegative && mds.getPriority() >= 0) { break; } // Proceeed normally IMethodSelector md = mds.getMethodSelector(); result = md.includeMethod(context, tm, isTestMethod); if (context.isStopped()) { return result; } // This selector returned false, move on to the next } return result; }
@Override public boolean includeMethod(IMethodSelectorContext context, ITestNGMethod method, boolean isTestMethod) { for (String group : method.getGroups()) { if (group.equals("test2")) { context.setStopped(true); return true; } } return false; }
/** @return true as soon as we fond a Method Selector that returns true for the method "tm". */ public boolean includeMethod(ITestNGMethod tm, boolean isTestMethod) { Collections.sort(m_methodSelectors); boolean foundNegative = false; IMethodSelectorContext context = new DefaultMethodSelectorContext(); boolean result = false; for (MethodSelectorDescriptor mds : m_methodSelectors) { // If we found any negative priority, we break as soon as we encounter // a selector with a positive priority if (!foundNegative) { foundNegative = mds.getPriority() < 0; } if (foundNegative && mds.getPriority() >= 0) { break; } // Proceeed normally IMethodSelector md = mds.getMethodSelector(); result = md.includeMethod(context, tm, isTestMethod); if (context.isStopped()) { return result; } // This selector returned false, move on to the next } return result; }
@Override public boolean includeMethod( IMethodSelectorContext context, ITestNGMethod method, boolean isTestMethod) { if (ALL.equalsIgnoreCase(whichGroup)) { return true; } boolean isEqual = Arrays.equals(new String[]{whichGroup}, method.getGroups()); if (context != null) { context.setStopped(true); } return isEqual; }
@Override public boolean includeMethod(IMethodSelectorContext context, ITestNGMethod method, boolean isTestMethod) { for (String group : method.getGroups()) { if (group.equals("test1")) { ppp( method.getMethodName() + " is group test1, don't include" ); context.setStopped(true); return false; } } ppp( method.getMethodName() + " is not in group test1" ); return true; }
@Override public boolean includeMethod(IMethodSelectorContext context, ITestNGMethod method, boolean isTestMethod) { if ( excludeIntegrationTests && method.getConstructorOrMethod().getDeclaringClass().isAnnotationPresent( IntegrationTest.class ) ) { context.setStopped( true ); return false; } else { return true; } }
@Override public boolean includeMethod(IMethodSelectorContext context, ITestNGMethod method, boolean isTestMethod) { if ( !includeJavaFXTests && method.getConstructorOrMethod().getDeclaringClass().isAnnotationPresent( JavaFXTest.class ) ) { context.setStopped( true ); return false; } else { return true; } }
public boolean includeMethod(IMethodSelectorContext context, ITestNGMethod method, boolean isTestMethod) { if (!ConfigurationImpl.get().isRunIntegrationTests() && method.getMethod().getDeclaringClass().isAnnotationPresent(IntegrationTest.class)) { context.setStopped(true); return false; } else { return true; } }
public boolean includeMethod(IMethodSelectorContext methodContext, ITestNGMethod method, boolean isTestMethod) { if (!ConfigurationImpl.get().isStandalone() || method.getMethod().getDeclaringClass().isAnnotationPresent(IntegrationTest.class)) { List<String> groups = Arrays.asList(method.getGroups()); if (groups.contains("incontainer-ri-broken") || groups.contains("incontainer-broken")) { methodContext.setStopped(true); return false; } } return true; }
public boolean includeMethod(IMethodSelectorContext ctx, ITestNGMethod method, boolean isTestMethod) { if (isWar(method.getMethod().getDeclaringClass()) && !isFullProfileOnly(method.getGroups())) { return true; } else { ctx.setStopped(true); return false; } }