Hello All,
I have question somewhat related to this question.
If I use stop button to kill the TestNG process in eclipse (shown in the other emails attachment), the test suite gets killed immediately without calling Teardown method(the selenium browser which I opened for this test suite in Setup method is still open.).
I tried using the TestNG annotations like @AfterMethod, @AfterTest, @AfterSuite for the Teardown method. None of these annotations help to reach the Teardown code.
I read in TestNG website that if I use listeners, then I can make testNG process to hit the Teardown method when OnTestSuccess, OnTestFailure, OnTestSkipped...
But I don't think the listeners will help, as the testNG results shows all the test cases that are run so far as passed and NO test is shown as skipped.
I don't think try and catch will help as no exceptions are thrown when I hit the eclipse STOP button.
Please advice.
Thank you,
Uma