Page 1 of 1

Report error

Posted: Wed Sep 06, 2017 2:13 pm
by MB_wiko
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?

Re: Report error

Posted: Wed Sep 06, 2017 3:01 pm
by krstcs
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.

Re: Report error

Posted: Thu Sep 07, 2017 1:32 pm
by MB_wiko
Thanks a lot this was the searched solution.