Display of report levels

Ask general questions here.
Rexette
Posts: 2
Joined: Fri Feb 16, 2018 8:42 am

Display of report levels

Post by Rexette » Fri Mar 16, 2018 12:49 pm

Hi,

in my test suite I set the current report level based on a condition to info or debug as follows
Report.CurrentReportLevel = ReportLevel.Info

When for example report level info is selected I don't want the debug entries displayed in the report and vice versa. How can I achieve this?

McTurtle
Posts: 191
Joined: Thu Feb 23, 2017 10:37 am
Location: Benedikt, Slovenia

Re: Display of report levels

Post by McTurtle » Mon Mar 19, 2018 10:54 am

Hello Rexette,

If you set the "Report.CurrentReportLevel = ReportLevel.Info;", then you will not see any debug messages from that moment on.
If you set "Report.CurrentReportLevel = ReportLevel.Debug;", then you will see both, Info and Debug messages. Actually, you will see all the possible messages that can be reported.

That's how report levels work. You cannot make Ranorex show report messages that are of a lower level (debug=10) and omit messages of a higher level (info=20). The report will always display "Failure" and then the report level that you set + everything in between:
ReportLevel.png
ReportLevel.png (7.68 KiB) Viewed 214 times
What you are trying to achieve is not very common. Maybe you should try to explain your use case in more detail and someone might come up with a better solution.

Regards,
McTurtle