Report error

Ranorex Studio, Spy, Recorder, and Driver.
MB_wiko
Posts: 93
Joined: Fri Sep 09, 2016 1:05 pm
Contact:

Report error

Post by MB_wiko » Wed Sep 06, 2017 2:13 pm

I inserted some usercode and I would write an error into the reports during running Ranorex. So I wrote following into user code:

Report.Log(ReportLevel.Error, "User", "Widget wurde nicht vergroessert.X: "+objX_new +":"+objX, repo.WebDocumentWikoWebTESTER2.GsResizeHandleGsResizeHandleBoth2HeaderInfo, new RecordItemIndex(13));

That works OK, I get the bug into the report:
Unbenannt.JPG
But the whole testcase shows a success, but I had the error during the test:
Unbenannt3.JPG
Unbenannt2.JPG
How can I get an eror for the whole test case? Does anybody knows some tipps?
You do not have the required permissions to view the files attached to this post.

krstcs
Posts: 2683
Joined: Tue Feb 07, 2012 4:14 pm
Location: Austin, Texas, USA

Re: Report error

Post by krstcs » Wed Sep 06, 2017 3:01 pm

You need to use Report.Failure() instead of Report.Error().

Only Success and Failure counts are carried through to the total count at the top of the report.
Shortcuts usually aren't...

MB_wiko
Posts: 93
Joined: Fri Sep 09, 2016 1:05 pm
Contact:

Re: Report error

Post by MB_wiko » Thu Sep 07, 2017 1:32 pm

Thanks a lot this was the searched solution.