Forum Discussion
- nimishbhuta8 years agoFrequent Contributor
Thanks but Runner.Stop or Runner.Halt will stop the whole test,but I want to exist one test iteration and continue with other then how can I do it ?
Example :- There are 3 actions such as Login, Action1 and Logout
I have created all this 3 action in Script and then created Keyword test and calling each of this action. Now I have data driven this now suppose first iteration runs fine and the second iteration (meaning second data row in excel) where it has issue in Action1 then I can stop that test iteration and then move to 3rd iteration. In UFT,we have ExitTestIteration which does this thing. What is possible in TestComplete?
Regards,
Nimish
- baxatob8 years agoCommunity Hero
Hi,
There is no any solution from the box. You should implement your own customized method.
- tristaanogre8 years agoEsteemed Contributor
Utilize exception handling (try/catch/finally) within your test cases. When something happens that you need to halt the test case, raise an exception using whatever code language or methodology you're using, let the "Catch" handle the exception, and let the test run continue on with the next test case. You are correct, Runner.Halt() will halt the whole run... so you need to find other ways of doing it. AS baxatob mentioned, you should work out whatever custom method will work best for your needs.