I currently have a C# user code module that checks a document and creates a report if certain errors exist within the document. I was able to provide an error report for that particular user code, but the test suite still shows as passed.
How can I append my code to get the test suite to show as failed?
Thanks!
Mark test suite as failed if condition in user code fails?
Re: Mark test suite as failed if condition in user code fails?
Have you tried...
Code: Select all
Report.Error(...);
Report.Log(ReportLevel.Error, ...);
Report.Failure(...);
Report.Log(ReportLevel.Failure, ...);
Shortcuts usually aren't...
Re: Mark test suite as failed if condition in user code fails?
Report.Failure worked perfectly. Thanks!
Re: Mark test suite as failed if condition in user code fails?
You're welcome!
Note that "Report.Error(...)" and "Report.Log(ReportLevel.Error, ...)" do the same thing. "Report.Error()" and all of the other methods like it (Info(), Pass(), etc.) are helpers for "Report.Log(ReportLevel.XXX, ...)".
Using "Report.Log()" allows you to pass a variable that will set the level.
Note that "Report.Error(...)" and "Report.Log(ReportLevel.Error, ...)" do the same thing. "Report.Error()" and all of the other methods like it (Info(), Pass(), etc.) are helpers for "Report.Log(ReportLevel.XXX, ...)".
Using "Report.Log()" allows you to pass a variable that will set the level.
Shortcuts usually aren't...