Page 1 of 1

Fail a test, but do not report as failed

Posted: Mon May 20, 2013 4:29 pm
by ddiekmann
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");

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

Posted: Wed May 22, 2013 3:14 pm
by Support Team
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)