Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on Apr 16th, 2012  |  syntax: None  |  size: 0.33 KB  |  hits: 7  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. How to stop TestNG executioner when exception occures?
  2. TestListenerAdapter tla = new TestListenerAdapter();
  3. IMethodInterceptor im = new  TestMethodInterceptor();
  4. TestNG testng = new TestNG();
  5. testng.setTestClasses(new Class[] { TestClass1.class, TestClass2.class});
  6. testng.addListener(tla);
  7. testng.setMethodInterceptor(im);
  8. testng.run();