Fail a test, but do not report as failed

Ranorex Spy, Recorder, and Studio.
ddiekmann
Posts: 2
Joined: Tue Nov 13, 2012 6:46 pm

Fail a test, but do not report as failed

Post by ddiekmann » Mon May 20, 2013 4:29 pm

So here is what I am trying to do. I have a data source set up with different environments. I want to read from a data source and if the cell value is blank Fail the Test Case and jump to the next sibling. If it is succesful preceed to the child. It is working as I want, however it reports failures when even though its behaving how I want it.

What i want to know is how can I
A.Jump out of a recording to a sibling test
OR
B. Use the On fail logic to handle jumping but not report that the step failed.

public void CheckBlank()
{
if (String.Equals(DataSource,"")){
throw new Ranorex.ElementNotFoundException("Data Source Blank - Not a failure but jump to sibling test case", null);
}
else
Report.Success("User Specific Validation","Data source Values correct...continue with this recording");

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

Re: Fail a test, but do not report as failed

Post by Support Team » Wed May 22, 2013 3:14 pm

Hello,

Please note, that it's not recommended to change the workflow of a test.
An exception would always cause a failure in your report.

Would it be possible for you to enable or disable a TestCase based on your condition?
Please take a look at the following posts in our forum:
Repeat a TestCase
Start a TestCase

Regards,
Markus (T)
.
Image