Page 1 of 1

Recovery Scenarios

Posted: Sat Jul 02, 2016 5:40 pm
by aumohanraj
Hi,

Is there any way to call a particular module whenever there is a failure in test step?

I would like to bring my application to certain page(Home Page) whenever the test case is failed. Is there any way to achieve this?

Thanks,
Mohanraj Kesavan

Re: Recovery Scenarios

Posted: Mon Jul 04, 2016 9:35 am
by Support Team
Hello Mohanraj Kesavan,

I would highly recommend using a so-called "tear down"-section. This section will be executed whenever the test fails and is used to bring back the application under test to a desired state. Please find further information regarding "SETUP/TEARDOWN"-sections within our user guide: http://www.ranorex.com/support/user-gui ... suite.html

I hope this information helps.

Sincerely,
Robert

Re: Recovery Scenarios

Posted: Wed Jul 06, 2016 6:26 am
by aumohanraj
Hi,

Teardown section will be executed irrespective of the test case status(Pass/Fail). If we bring

Bringing back the application to the desired state after the each test case iteration will take more time. So It would be great if have the feature to call a module whenever the test step fails

Thanks,
Mohanraj Kesavan

Re: Recovery Scenarios

Posted: Wed Jul 06, 2016 3:36 pm
by krstcs
You should use the teardown and include an IF statement in your teardown module that checks for the status of the test (Success, Failed, etc.) and then does whatever you need based on the condition. That is the correct way to handle it. There is no need for another feature.

Also, you can layer the test cases in many different ways to make the test behave in many different ways, depending on what your actual needs are. And each one has a setup/teardown.