Log Level default values

Ask general questions here.
SanMan
Posts: 150
Joined: Tue Apr 13, 2010 9:59 am

Log Level default values

Post by SanMan » Thu Sep 02, 2010 10:50 am

Hi,

Is it possible to modify -Ranorex Test Report- -Log Level- so, that e.g. Info is not ticket by default?

I have used the: Report.Setup(ReportLevel.Debug, "myReport.rxlog", true, true) so only one log file is generated. When I am running my testset multiple times, this generated quite large report, which takes time to open. I wish I could see the test result first and if neccesary, open the Info.

User avatar
Support Team
Site Admin
Site Admin
Posts: 11709
Joined: Fri Jul 07, 2006 4:30 pm
Location: Graz, Austria

Re: Log Level default values

Post by Support Team » Thu Sep 02, 2010 1:21 pm

Hi,
SanMan wrote:Is it possible to modify -Ranorex Test Report- -Log Level- so, that e.g. Info is not ticket by default?
Of course it is possible to customize your report. If you want to change the "checked" states when you open the RxLog file, you have to modify the *.xls file. In this file you will find a section named
<fieldset>
    <legend>Log Level</legend>
    <label for="debug">Debug</label>
    <input type="checkbox" id="debug" name="debug" onClick="switchVisibility('debug','Validation');" checked="1" />
    <label for="info">Info</label>
    <input type="checkbox" id="info" name="info" onClick="switchVisibility('info','Validation');" checked="1" />
    <label for="warn">Warn</label>
    <input type="checkbox" id="warn" name="warn" onClick="switchVisibility('warn','Validation');" checked="1" />
    <label for="error">Error</label>
    <input type="checkbox" id="error" name="error" onClick="switchVisibility('error','Validation');" checked="1" />

    <label for="testresult">Test Result</label>
    <input type="checkbox" id="testresult" name="testresult" onClick="switchVisibility('failure','success');switchVisibility('success','failure')" checked="1" />

</fieldset>
To set the state of a specific checkbox to false, just set the checked state to '0'. Now you have a custom ReportStyleSheet. To use this file please take a look to following blog http://www.ranorex.com/blog/customizing-ranorex-reports

Regards,
Peter
Ranorex Team
.
Image

SanMan
Posts: 150
Joined: Tue Apr 13, 2010 9:59 am

Re: Log Level default values

Post by SanMan » Mon Sep 06, 2010 1:05 pm

Hi,

What could be the problem; I have added the summary heading:
<h2>Summary:
<xsl:choose>
<xsl:when test="//message[@level='FAILED' or @level='ERROR']">
<span class="failure">FAILED</span>
</xsl:when>
<xsl:otherwise>
<span class="success">PASSED</span>
</xsl:otherwise>
</xsl:choose>
</h2>

and it is showed corretly, when report is shown.

When I changed the label name, that change was shown in report.

But when I have changed the checked states to "0", they are still ticket?

User avatar
Support Team
Site Admin
Site Admin
Posts: 11709
Joined: Fri Jul 07, 2006 4:30 pm
Location: Graz, Austria

Re: Log Level default values

Post by Support Team » Mon Sep 06, 2010 2:54 pm

Hi,

The checked attribute in HTML is valueless. It also makes no sense in our XSL to set the checked state to 1. :lol:
Just remove the attribute from the line you want to remove the tick. And please add following line to the XSL
<script>switchVisibility('info','Validation');</script>
before the body tag of the HTML is closed.

Regards,
Peter
Ranorex Team
.
Image

SanMan
Posts: 150
Joined: Tue Apr 13, 2010 9:59 am

Re: Log Level default values

Post by SanMan » Tue Sep 07, 2010 5:55 am

Hi,

I removed the "checked attribute". Now the Ranorex Report opens without Info ticket, but INFO level is shown. When I tick the Info, INFO level is not shown.

-> How to make it work so, that report opens without INFO level shown and when info is ticket, INFO level is shown?

SanMan
Posts: 150
Joined: Tue Apr 13, 2010 9:59 am

Re: Log Level default values

Post by SanMan » Tue Sep 07, 2010 8:09 am

Hi,

I got it :oops:

I hade placed the <script>switchVisibility('info','Validation');</script> in the wrong place...

Thank you for your help!