Page 1 of 1

Error Behaivor 'Continue with sibling'

Posted: Mon Dec 23, 2013 9:19 am
by Oksana
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

Re: Error Behaivor 'Continue with sibling'

Posted: Mon Dec 23, 2013 3:06 pm
by mebner
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

Re: Error Behaivor 'Continue with sibling'

Posted: Tue Dec 24, 2013 7:54 am
by Oksana
Thanks a lot!