RE: How to make test cases run even if an exception occurs. Exceution of cases should not stop.
My selenium scripts are getting stopped if an exception occurred and the remaining set of cases are not executing in that suite file .
I want the suite to execute the remaining cases also even if an exception occured.
Thanks in advance.
Are your test cases getting skipped or all the test cases getting failed with same exception
Below answer is if your remaining test cases are getting skipped
In testng skip happens mostly due to 2 reason
- dependent methods parent method fails
- Exception is thrown in Configuration Method(@BeforeMethod,@BeforeTest,@BeforeClass, @After …..)
I believe exception is thrown in some of the configuration method , as suggested by other do use try/catch atleast in configuration method,