Run TearDown and stop all execution?

Ranorex Studio, Spy, Recorder, and Driver.
Posts: 5
Joined: Fri Sep 08, 2017 6:10 pm

Run TearDown and stop all execution?

Post by jadegodsey » Fri Dec 01, 2017 7:17 pm

I've looked high and low, sorry if I've missed something obvious. This seems like it would be something simple.

My suite structure looks as follows:

TestSet 1 (Smart Folder)
- Test Case 1 (Test Case)
- - Recording: Start app, login
- - Code Modules & Recordings - validate stuff, navigate around app
- Test Case 2 (Test Case) etc.
TestSet 2 (Smart Folder)
- Test Case 3 (Test Case)
..... etc.

My question is, if for example the Login/App start test failed, on that failure I want to run the TearDown and then stop all of the automation execution. All Smart folders, all test cases, everything.

Currently I report an error, and the Test Case fails and continues onto the next test case. Which is fine in many scenarios, but not all of them.

Failing to login for example, means it continues for an hour trying to find objects which don't exist.

How would I say:

If (logic) then run Teardown and end everything?

Ranorex Guru
Posts: 2683
Joined: Tue Feb 07, 2012 4:14 pm
Location: Austin, Texas, USA

Re: Run TearDown and stop all execution?

Post by krstcs » Fri Dec 01, 2017 7:33 pm

If modules in TestSet2 are dependent on TestSet1, then they shouldn't be separate. My suggestion would be to put the Login modules in the setup section of your suite, or to put both TestSet1 and TestSet2 in another parent smart folder and put the startup actions in that parent folder's setup or just before the first smartfolder that needs it. You can then set the error behavior for the parent so that the run stops on any failure, etc.

Shortcuts usually aren't...