Throwing an error for an expected failure

Ask general questions here.
Fowler23
Posts: 5
Joined: Fri Sep 23, 2016 9:13 am

Throwing an error for an expected failure

Post by Fowler23 » Wed Oct 12, 2016 12:54 pm

Hi,
I have a scenario where I am checking if items in a list taken from a simple data table are found in a drop down list in the application.

There is one item in the list that is not in the drop down list.
I am reporting that this item is not found in the list by using the report.failure()
But I see in my overall report that as well as the failure which I expected there is an error thrown
(The module has failed because one or more actions have failed. )
and my test case has a status of failed in the overall report.

I need the report to show a failure as this item is not found but I think the overall test case should show as successful. Is there a way to do this.

I have set up the test case to continue with iteration and the error behavior is also set to continue with iteration.
I am using ranorex 5.4.6 on a windows 7 machine.

asdf
Posts: 174
Joined: Mon Mar 21, 2016 3:16 pm

Re: Throwing an error for an expected failure

Post by asdf » Thu Oct 13, 2016 12:19 pm

Hi Fowler,

I would suggest using

Code: Select all

Report.Error("Fail","Item not found");
in order to perform a error message.
With this approach, only the certain iteration will fail.

Hope this helps.

Best regards,
asdf