How to stop teardown or only execute for some attempts

I have added a teardown handler in each test case, the problem is sometime running halfway the system will have performance issue and the execution keep jumping to the teardown step.
I facing this problem where the testing continuously run for 5 hours.
Please suggest any solution that I can stop the teardown for certain attempt, so that the execution can be terminated immediately after some attempts. Thank!

1 Like