Ranorex Report filters sorted by messages order.
- artur_gadomski
- Posts: 207
- Joined: Mon Jul 19, 2010 6:55 am
- Location: Copenhagen, Denmark
- Contact:
Ranorex Report filters sorted by messages order.
Hi
It seems like the filter of messages in test module is sorted according to what message comes first so if I have an info message first in the module then some debug then a sucess order of filters will be different than if I have a debug message first.
Is this something I can specify? I would preffer if the order was always the same because it's easier to turn of debug messages without having to look for the checkbox.
On a sidenote: is it possible to make a report with debug level disabled by default? I still want the messages to be logged and have an ability to see them so seting minimum level to info will not work for me.
It seems like the filter of messages in test module is sorted according to what message comes first so if I have an info message first in the module then some debug then a sucess order of filters will be different than if I have a debug message first.
Is this something I can specify? I would preffer if the order was always the same because it's easier to turn of debug messages without having to look for the checkbox.
On a sidenote: is it possible to make a report with debug level disabled by default? I still want the messages to be logged and have an ability to see them so seting minimum level to info will not work for me.
- Support Team
- Site Admin
- Posts: 12145
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Houston, Texas, USA
- Contact:
Re: Ranorex Report filters sorted by messages order.
Hi,
We will change this to the order of the report level. We will use the same order as in the recorder action report
Regards,
Peter
Ranorex Team
You are right, currently the order depends on which message is logged first.artur_gadomski wrote: I would preffer if the order was always the same because it's easier to turn of debug messages without having to look for the checkbox.
We will change this to the order of the report level. We will use the same order as in the recorder action report
You have to edit the xsl file. There you can set the checked states.artur_gadomski wrote: is it possible to make a report with debug level disabled by default? I still want the messages to be logged and have an ability to see them so seting minimum level to info will not work for me.
Regards,
Peter
Ranorex Team
Re: Ranorex Report filters sorted by messages order.
Hi
Can you please help me modifying xsl file?
How can I set default checked state to 'un-checked' to Debug checkbox?
-re
Pavlo
Can you please help me modifying xsl file?
How can I set default checked state to 'un-checked' to Debug checkbox?
-re
Pavlo
- Support Team
- Site Admin
- Posts: 12145
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Houston, Texas, USA
- Contact:
Re: Ranorex Report filters sorted by messages order.
Hi,
Regards,
Peter
Ranorex Team
We currently have a bug in the XSL file which will be fixed in Ranorex 3.3, therefore this is not possible at the moment. I cannot send you the Ranorex 3.3 file because it is a bit different to the 3.2 XSL file.Pavlo wrote:Can you please help me modifying xsl file?
Regards,
Peter
Ranorex Team
Re: Ranorex Report filters sorted by messages order.
Can I ask for help again, when Ranorex 3.3 is releasedSupport Team wrote:Hi,
We currently have a bug in the XSL file which will be fixed in Ranorex 3.3, therefore this is not possible at the moment. I cannot send you the Ranorex 3.3 file because it is a bit different to the 3.2 XSL file.Pavlo wrote:Can you please help me modifying xsl file?
Regards,
Peter
Ranorex Team
Regards,
Pavlo
- Support Team
- Site Admin
- Posts: 12145
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Houston, Texas, USA
- Contact:
Re: Ranorex Report filters sorted by messages order.
Hello Pavlo,
The order of the check boxes in the report is fix (Debug, Info, Warn, Error, Success, Failure, Custom). If there is e.g. no error in your test the check box for Error will not be shown.
If you want that the Debug messages will not be shown in the Report you can change the Log Level settings in the Test Suite properties.
Ranorex 3.3 is already released.
Regards,
Bernhard
Ranorex Support Team
The order of the check boxes in the report is fix (Debug, Info, Warn, Error, Success, Failure, Custom). If there is e.g. no error in your test the check box for Error will not be shown.
If you want that the Debug messages will not be shown in the Report you can change the Log Level settings in the Test Suite properties.
Ranorex 3.3 is already released.
Regards,
Bernhard
Ranorex Support Team
Re: Ranorex Report filters sorted by messages order.
Hi
Actually I'm looking on how to still have debug messages logged by not displayed by default in report.
E.g. minimum level = DEBUG, but in report xml checkbox with debug level is un-ticked by default and debug messages are not displayed (but could be easily checked by ticking that checkbox)
Actually I'm looking on how to still have debug messages logged by not displayed by default in report.
E.g. minimum level = DEBUG, but in report xml checkbox with debug level is un-ticked by default and debug messages are not displayed (but could be easily checked by ticking that checkbox)
artur_gadomski wrote: is it possible to make a report with debug level disabled by default? I still want the messages to be logged and have an ability to see them so seting minimum level to info will not work for me.
- Support Team
- Site Admin
- Posts: 12145
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Houston, Texas, USA
- Contact:
Re: Ranorex Report filters sorted by messages order.
Hi,
My colleague and I wrote a few new codelines for the .xsl file and voila the result gives you a report with un-ticked and hidden debug-messages.
These lines are the one which did the trick:
The second is for un-ticking the "Debug" checkbox by default.
Wish you a lot of fun with this.
Larissa
Ranorex Support Team
My colleague and I wrote a few new codelines for the .xsl file and voila the result gives you a report with un-ticked and hidden debug-messages.
These lines are the one which did the trick:
<xsl:variable name="RXStyle" > <xsl:choose> <xsl:when test="@level!='Debug'"> <xsl:value-of select="@style" /> </xsl:when> <xsl:otherwise> <xsl:value-of select="'display:none'" /> </xsl:otherwise> </xsl:choose> </xsl:variable> <tr class="{translate(@level,' ','_')}" style="{$RXStyle}" onMouseOver="DisplayHoverMenu(this)" onMouseOut="HideHoverMenu(this)">The first code-snipped is for hiding the debug-messages for now.
The second is for un-ticking the "Debug" checkbox by default.
<xsl:choose> <xsl:when test="$level/../../activity[@type='test module']"> <xsl:choose> <xsl:when test="$levelName!='Debug'"> <input type="checkbox" id="checkBox{$currentId}" name="checkBox{$currentId}" onClick="$(this).parent().parent().next().find('tr.{translate($levelName,' ','_')}').toggle();" checked="1" /> </xsl:when> <xsl:otherwise> <input type="checkbox" id="checkBox{$currentId}" name="checkBox{$currentId}" onClick="$(this).parent().parent().next().find('tr.{translate($levelName,' ','_')}').toggle();" /> </xsl:otherwise> </xsl:choose> </xsl:when> <xsl:otherwise> <input type="checkbox" id="checkBox{$currentId}" name="checkBox{$currentId}" onClick="$('tr.{translate($levelName,' ','_')}').toggle();" /> </xsl:otherwise> </xsl:choose>You can copy this modified code into your .xsl file or you copy the whole modified .xsl stylesheet from the attachment into your Report folder. In the .xsl file from the attachment another line of code needs to be modified, namely the one where the .xsl file is called recursively.
ss.load("MODIFIED_RanorexReport3.xsl");To tell Ranorex to use this stylesheet instead of the default RanorexReport3.xsl open your Ranorex, go to the TestSuit properties (see Test Suite Settings) and choose as Custom XSL File path the one of the modified stylesheet.
Wish you a lot of fun with this.
Larissa
Ranorex Support Team
You do not have the required permissions to view the files attached to this post.
- artur_gadomski
- Posts: 207
- Joined: Mon Jul 19, 2010 6:55 am
- Location: Copenhagen, Denmark
- Contact:
Re: Ranorex Report filters sorted by messages order.
This is brilliant. Exactly what we needed.
I think attachement is missing.
To make it a bit more clear I replaced line in stylesheet:
And lines:
I think attachement is missing.
To make it a bit more clear I replaced line in stylesheet:
<tr class="{@level}" style="{@style}" onMouseOver="DisplayHoverMenu(this)" onMouseOut="HideHoverMenu(this)">with first code.
And lines:
<xsl:choose> <xsl:when test="$level/../../activity[@type='test module']"> <input type="checkbox" id="checkBox{$currentId}" name="checkBox{$currentId}" onClick="$(this).parent().parent().next().find('tr.{$levelName}').toggle();" checked="1" /> </xsl:when> <xsl:otherwise> <input type="checkbox" id="checkBox{$currentId}" name="checkBox{$currentId}" onClick="$('tr.{$levelName}').toggle();" checked="1" /> </xsl:otherwise> </xsl:choose>with second code.
- Support Team
- Site Admin
- Posts: 12145
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Houston, Texas, USA
- Contact:
Re: Ranorex Report filters sorted by messages order.
Hi,
Yeah you are right, sorry for that. I now attached it to my original post.
Regards,
Larissa
Ranorex Support Team
Yeah you are right, sorry for that. I now attached it to my original post.
Regards,
Larissa
Ranorex Support Team
Re: Ranorex Report filters sorted by messages order.
Hi
Can you please advise how to use custom xsl file if I'm not using TestSuites.
I'm setting up reports manually with following piece of code
And I can't find any tip in Ranorex documentation and forum how to use custom xsl file
I've already tried to use, but it didn't help: custom xsl is not used (but generic xsl file still used)
Can you please advise how to use custom xsl file if I'm not using TestSuites.
I'm setting up reports manually with following piece of code
Code: Select all
TestReport.Setup(ReportLevel.Debug, reportFileName, true, true, new Duration(1000));
I've already tried to use, but it didn't help: custom xsl is not used (but generic xsl file still used)
Code: Select all
string reportFileName = Path.Combine(reportFolder, fixtureName+"Results.html");
string customXSLFile = Config.RootPath + "3rdParty\\RanorexReport4_DEBUG_disabled.xsl";
XmlLogger.SetReportStylesheetFile(customXSLFile);
TestReport.Setup(ReportLevel.Debug, reportFileName, true, true, new Duration(1000));
- Support Team
- Site Admin
- Posts: 12145
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Houston, Texas, USA
- Contact:
Re: Ranorex Report filters sorted by messages order.
Hello,
Unfortunately it is not possible to mix the XMLLogger class with the TestReport class.
If you want to use a custom report template you have to pass the file location where your custom report is located as parameter.
Please let me know if you need more information or assistance.
Thank you!
Regards,
Bernhard
Unfortunately it is not possible to mix the XMLLogger class with the TestReport class.
If you want to use a custom report template you have to pass the file location where your custom report is located as parameter.
public static void Setup( ReportLevel minLevel, string fileName, bool logToConsole, string customReportFileLocation )Please take a look into the API Documentation on our web site.
Please let me know if you need more information or assistance.
Thank you!
Regards,
Bernhard
Re: Ranorex Report filters sorted by messages order.
I've tried that, but got exception
Code:
Exception details:
Since exception details says: DirectoryNotFoundException, I've modified the code and pass directory path but not full name for xsl file.
Code:
New exception:
Can you please clarify what is "Report template" and why should I have *.rxlog file and what should be inside this file?
Code:
Code: Select all
string customXSLFile = Config.RootPath + "3rdParty\\RanorexReport4_DEBUG_disabled.xsl";
TestReport.Setup(ReportLevel.Debug, reportFileName, true, true, new Duration(1000), customXSLFile);
Code: Select all
System.IO.DirectoryNotFoundException: The custom report template directory '...my path...3rdParty\RanorexReport4_DEBUG_disabled.xsl' does not exist. at Ranorex.Core.Reporting.ReportEnvironment.Create(String r...
Code:
Code: Select all
string customXSLFile = Config.RootPath + "3rdParty\\RanorexReport4_DEBUG_disabled.xsl";
string customXSLFolder = Path.GetDirectoryName(customXSLFile);
TestReport.Setup(ReportLevel.Debug, reportFileName, true, true, new Duration(1000), customXSLFolder);
Code: Select all
System.IO.FileNotFoundException: Report template does not contain a *.rxlog view file. at Ranorex.Core.Reporting.ReportEnvironment.ValidateCustomReportDirectory() at Ranorex.Core.Reporting.ReportEnvironment..ctor(String reportViewName, String reportFil...
Can you please clarify what is "Report template" and why should I have *.rxlog file and what should be inside this file?
- Support Team
- Site Admin
- Posts: 12145
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Houston, Texas, USA
- Contact:
Re: Ranorex Report filters sorted by messages order.
Hello,
Thank you for providing the error messages.
This message means that it is not possible to pass the path to the .xsl file directly in the TestReport.Setup() method. You can only define the directory from the test report as you did in your second code example.
In general the Report Template consist of the following files:
Regards,
Bernhard
Thank you for providing the error messages.
Code: Select all
System.IO.DirectoryNotFoundException: The custom report template directory '...my path...3rdParty\RanorexReport4_DEBUG_disabled.xsl' does not exist. at Ranorex.Core.Reporting.ReportEnvironment.Create(String r...
Code: Select all
System.IO.FileNotFoundException: Report template does not contain a *.rxlog view file. at Ranorex.Core.Reporting.ReportEnvironment.ValidateCustomReportDirectory() at Ranorex.Core.Reporting.ReportEnvironment..ctor(String reportViewName, String reportFil...
- - customStyle.css
- RanorexReport4.png
- RanorexReport4.xsl
- View.rxlog
Regards,
Bernhard
Re: Ranorex Report filters sorted by messages order.
What is View.rxlog ? Where should I take this file? What should be it's content?