Error Behaivor 'Continue with sibling'

Ask general questions here.
Oksana
Posts: 64
Joined: Tue Jan 15, 2013 10:20 am

Error Behaivor 'Continue with sibling'

Post by Oksana » Mon Dec 23, 2013 9:19 am

Hello,

Can you explain what is expected when it is selected 'Continue with sibling' error behaivor for testcases?
Suggesting on the base of information in User Guide 'Lesson 4: Ranorex Test Suite' -> 'Test Case Settings' (http://www.ranorex.com/support/user-gui ... html#c3028), I expect:
- when in some test case occures failure, execution of this test case should be stopped and the next test case must be started.
But, in fact, for the test case, where failure has occured, all the steps (recording/code modules) are executed.

In the attached files you can find:
- code of the modulte that is called in all test cases (it simply reports failure);
- screenshot for the test cases, that were ran;
- screenshot of the report, that demonstrate, that for the test cases were executed all the steps (execution was not stopped after failure).

So, is such behaivor right? Can you advise what errror behaivor must be selected in order to stop execuion of the current test case after failure and go to the next test case?

Sincerely,
Oksana
You do not have the required permissions to view the files attached to this post.

mebner

Re: Error Behaivor 'Continue with sibling'

Post by mebner » Mon Dec 23, 2013 3:06 pm

Hi,

Report.Failure() logs a logical failure (e.g. test step failure) message and it doesn't abort the whole test case. When you want to abort the whole test case you have to throw a new exception.
For example:
throw new RanorexException("your_text");

Please choose the exception to your abort criteria, e.g. when you validate something please use ValidationException().

Regards,
Markus

Oksana
Posts: 64
Joined: Tue Jan 15, 2013 10:20 am

Re: Error Behaivor 'Continue with sibling'

Post by Oksana » Tue Dec 24, 2013 7:54 am

Thanks a lot!