- How to stop TestNG executioner when exception occures?
- TestListenerAdapter tla = new TestListenerAdapter();
- IMethodInterceptor im = new TestMethodInterceptor();
- TestNG testng = new TestNG();
- testng.setTestClasses(new Class[] { TestClass1.class, TestClass2.class});
- testng.addListener(tla);
- testng.setMethodInterceptor(im);
- testng.run();