@Override public Method getMethod() { return testNGMethod.getMethod(); }
@Override public void onTestSuccess(ITestResult tr) { success++; count++; String location = tr.getTestClass().getRealClass().getSimpleName() + '#' + tr.getMethod().getMethodName(); try { Method realTestMethod = tr.getMethod().getMethod(); Test specAssert = realTestMethod.getAnnotation(Test.class); if (specAssert != null && specAssert.description() != null && !specAssert.description().isEmpty()) { log("[SUCCESS] " + specAssert.description() + "(" + location + ")"); } else { log("[SUCCESS] " + location); } } catch (IOException e) { throw new IllegalStateException("IO Error", e); } }
@Override public void onTestSkipped(ITestResult tr) { skipped++; count++; String location = tr.getTestClass().getRealClass().getSimpleName() + '#' + tr.getMethod().getMethodName(); try { Method realTestMethod = tr.getMethod().getMethod(); Test specAssert = realTestMethod.getAnnotation(Test.class); if (specAssert != null && specAssert.description() != null && !specAssert.description().isEmpty()) { log("[SKIPPED] " + specAssert.description() + "(" + location + ")"); } else { log("[SKIPPED] " + location); } } catch (IOException e) { throw new IllegalStateException("IO Error", e); } }
@Override @Deprecated public Method getMethod() { return delegate.getMethod(); }
@Override @Deprecated public Method getMethod() { return delegate.getMethod(); }
@Override public AccessibleObject getStaticPart() { return testResult.getMethod().getMethod(); } });
public Method getMethod() { return testResult.getMethod().getMethod(); }
public Method getMethod() { return testResult.getMethod().getMethod(); }
public Method getMethod() { return testResult.getMethod().getMethod(); }
@Override public Method getMethod() { return testResult.getMethod().getMethod(); }
@Override @Deprecated public Method getMethod() { return method.getMethod(); }
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 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 ctx, ITestNGMethod method, boolean isTestMethod) { if (isWar(method.getMethod().getDeclaringClass()) && !isFullProfileOnly(method.getGroups())) { return true; } else { ctx.setStopped(true); return false; } }
@Override public Object proceed() throws Throwable { testatoo.on(testInstance, testResult.getMethod().getMethod()); callBack.runTestMethod(testResult); return null; }
private static boolean isGUITest(ITestResult testResult) { Class<?> realClass = testResult.getTestClass().getRealClass(); Method testMethod = testResult.getMethod().getMethod(); return GUITestFinder.isGUITest(realClass, testMethod); }
public void afterInvocation(IInvokedMethod method, ITestResult testResult) { Method javaMethod = method.getTestMethod().getMethod(); Class clazz = javaMethod.getDeclaringClass(); if (!checkBMNGListener(clazz)) { return; } try { bmngAfterTest(javaMethod); try { BMUnitConfigState.resetConfigurationState(javaMethod); } catch(Exception e1) { } } catch (Exception e) { throw new TestNGException(e); } }
/** * Runs {@link #initBeforeTest(ITestResult)}. * * @see IInvokedMethodListener#beforeInvocation(IInvokedMethod, ITestResult) */ public final void beforeInvocation(IInvokedMethod method, ITestResult testResult) { if (!isUsedAsSubClass(method) && isListenerDefinedOnTestClass(method)) { initBeforeTest(testResult.getInstance(), testResult.getMethod().getMethod()); } }
/** * Runs {@link #initBeforeTest(ITestResult)}. * * @see IInvokedMethodListener#beforeInvocation(IInvokedMethod, ITestResult) */ public final void beforeInvocation(IInvokedMethod method, ITestResult testResult) { if (!isUsedAsSubClass(method) && isListenerDefinedOnTestClass(method)) { initBeforeTest(testResult.getInstance(), testResult.getMethod().getMethod()); } }
public void beforeInvocation(IInvokedMethod method, ITestResult testResult) { Method javaMethod = method.getTestMethod().getMethod(); Class clazz = javaMethod.getDeclaringClass(); if (!checkBMNGListener(clazz)) { return; } if (clazz != currentClazz) { switchClass(clazz); } try { bmngBeforeTest(javaMethod); } catch (Exception e) { try { BMUnitConfigState.resetConfigurationState(javaMethod); } catch(Exception e1) { } throw new TestNGException(e); } }