Continue with test if one of validation fails in data driven

Ranorex Spy, Recorder, and Studio.
vnet
Posts: 29
Joined: Tue Jul 24, 2012 8:13 pm

Continue with test if one of validation fails in data driven

Post by vnet » Wed Sep 26, 2012 7:44 pm

I have a data driven test cases where I am reading values from a csv file, entering in the text box and then validating the result. This works fine when all my validation passes. But the minute one of the validation fails, test exits and doesn't run the test for remaining values. My question is, lets say I have 4 values to input and even if some of the validation fails, my test should continue running. I tried 'Continue on Fail' option on all the validation steps but it didn't work.

I was doing some digging I found out this topic http://www.ranorex.com/support/user-gui ... ation.html, sadly its for older version and there is no update for newer version.
Attachments
pic.PNG
screenshot for the test
pic.PNG (16.3 KiB) Viewed 2257 times

User avatar
Support Team
Site Admin
Site Admin
Posts: 11709
Joined: Fri Jul 07, 2006 4:30 pm
Location: Graz, Austria

Re: Continue with test if one of validation fails in data driven

Post by Support Team » Thu Sep 27, 2012 4:45 pm

Hi,

"Enable Continue On Fail" should work in this case did you also set the Error Behavior of the Test Case to “Continue with iteration”?

Regards,
Markus
Ranorex Support Team
.
Image

vnet
Posts: 29
Joined: Tue Jul 24, 2012 8:13 pm

Re: Continue with test if one of validation fails in data driven

Post by vnet » Thu Sep 27, 2012 5:54 pm

Yes tried it and worked :)

AutomationTester
Posts: 30
Joined: Mon Jan 21, 2013 1:31 pm

Re: Continue with test if one of validation fails in data driven

Post by AutomationTester » Mon Apr 01, 2013 8:32 am

Hi,
How can I enable it in code module?

User avatar
Support Team
Site Admin
Site Admin
Posts: 11709
Joined: Fri Jul 07, 2006 4:30 pm
Location: Graz, Austria

Re: Continue with test if one of validation fails in data driven

Post by Support Team » Tue Apr 02, 2013 4:39 pm

Hello,

You could use the following code to set the error behavior of your Test Case:
TestCase myTC = TestCase.Current as TestCase;
myTC.ErrorBehavior = ErrorBehavior.ContinueNextIteration;
Warning:
This is not a supported way to change the error behavior.
It is recommended to set it in the Test Suite.

Regards,
Markus (T)
.
Image