Skip remaining testcases when current testcase fails

Best practices, code snippets for common functionality, examples, and guidelines.
pandiyarajk
Posts: 5
Joined: Thu May 27, 2010 8:03 am

Skip remaining testcases when current testcase fails

Post by pandiyarajk » Mon Nov 21, 2016 2:04 pm

I am working in Ranorex Studio 6.0.1 and have recorded a web browser automation test suite.

I have testcase collection such as
1. Login
2. Edit Document
3. Delete Document

I want to skip Edit Document and remaining test cases in the suite when Login testcase fails.

How to skip remaining testcases when current testcase fails?

Regards,
Pandi

Martin
Posts: 152
Joined: Fri Aug 15, 2014 12:24 pm

Re: Skip remaining testcases when current testcase fails

Post by Martin » Mon Nov 21, 2016 2:12 pm

You can achive this through "Error behaviour" context menu.

Open the Test Suite and right click a test case. Select "Error behaviour" > "Stop"

So you'd set it for "Login" and "Edit document" (and everywhere where you expect this behaviour).
When validation error or exception is thrown the next test case will not launch and the testrun will stop.

Furthermore i believe that if you group all these test cases into another test case you can set further error behaviour action to continue with the next grouped test cases when the previous ones fail.