Page 1 of 2
report appending in 2.2
Posted: Wed Nov 18, 2009 9:37 pm
by Ruser
In the 2.2 release note, there is:
"The XML Report Logger now supports appending to existing files, custom XSL files and HTML markup logging"
Do you have any user guide on this? What I want to do is to put multiple reports into a single report file.
Re: report appending in 2.2
Posted: Thu Nov 19, 2009 8:08 pm
by atom
Hiya
I agree some documentation on this is needed
Regards
Re: report appending in 2.2
Posted: Fri Nov 20, 2009 11:15 am
by Support Team
Documentation for this and other parts is currently under construction
"The XML Report Logger now supports appending to existing files, custom XSL files and HTML markup logging"
Here is the short version:
1) To append to XML logs use XmlLogger.AppendExisting = true
2) Custom XSL: use XmlLogger.SetReportStyleSheet (or SetReportStyleSheetFile)
3) To log HTML tags use Report.LogHtml(level, htmlText)
1&2 need to be called before Report.Setup()
Michael
Ranorex Team
Re: report appending in 2.2
Posted: Fri Nov 20, 2009 8:02 pm
by atom
ok thanks
I see the ranorex XSL is using a CSS that is coming from your website
If I modify the XSL, Im ok to reference the same CSS ?
Also there is:
<log title="Ranorex Test Report">
can that be customised also? e.g. "MyCompany Test Report"!
(Sorry to remove your good name and logo!)
Re: report appending in 2.2
Posted: Mon Nov 23, 2009 4:52 pm
by Ruser
Thanks for the information.
I am still not quite sure what to do If I have multiple solutions to run and would like to generate only one report file. I guess this scirpt:
XmlLogger.AppendExisting = true
appends the report to the existing report file inside the solution.
For me, this one only works if I run the same solution multiple times and generate one report file, right?
Re: report appending in 2.2
Posted: Wed Nov 25, 2009 10:37 am
by Support Team
atom wrote:I see the ranorex XSL is using a CSS that is coming from your website
If I modify the XSL, Im ok to reference the same CSS ?
Yes, feel free to use the CSS from our homepage.
atom wrote:Also there is:
<log title="Ranorex Test Report">
can that be customised also? e.g. "MyCompany Test Report"!
If you create your own XSL, you can customize everything. For example, just don't use the title in the <log> tag, but a hard-coded one in your XSL.
Ruser wrote:XmlLogger.AppendExisting = true
appends the report to the existing report file inside the solution.
For me, this one only works if I run the same solution multiple times and generate one report file, right?
XmlLogger.AppendExisting = true only applies if you specify an existing log file in
Report.Setup.
Regards,
Alex
Ranorex Support Team
Re: report appending in 2.2
Posted: Thu May 13, 2010 9:12 pm
by Gunner1980
Any update on this documentation? I have been pulling my hair out over this for several weeks now.
Re: report appending in 2.2
Posted: Fri May 14, 2010 8:03 am
by Support Team
Gunner1980 wrote:Any update on this documentation? I have been pulling my hair out over this for several weeks now.
The Ranorex User Guide contains documentation for this feature, please see the following topic:
http://www.ranorex.com/support/user-gui ... html#c2681
The corresponding API documentation for that class was also extended:
http://www.ranorex.com/Documentation/Ra ... Report.htm
http://www.ranorex.com/Documentation/Ra ... etup_1.htm
Regards,
Alex
Ranorex Team
Re: report appending in 2.2
Posted: Fri May 14, 2010 5:01 pm
by DirkB
Hi,
I try do to custimize the reports too:
1. another logo
2. Insertion of line numbers
SetReportStylesheetFile accesses my modified xls - ok
But:
1. Changes title=Ranorex doesnt appear within report
2. I didn't find the mentioned tag <log title="...
Regards
Dirk
Re: report appending in 2.2
Posted: Mon May 17, 2010 10:57 am
by Support Team
Hi Dirk,
I just checked and you are right, the title cannot be changed without modifying the XML file
I have added a feature request for V2.3.2 (something like XmlLogger.Title = "My Company Report")
Also, we have major improvements planned for V3.0 Reporting, so if there are any suggestions or wishes this is the right location to post them
Michael
Ranorex Team
Re: report appending in 2.2
Posted: Mon May 17, 2010 5:39 pm
by Gunner1980
Additionally I would suggest a way to not need access to the internet. I am running in a closed environment where my test systems will not have access to the internet which defaults the style sheet back to something basic. I have tried downloading the style sheets locally and changing the path in the xsl file but I can't seem to get it to read it in without using an absolute path.
Re: report appending in 2.2
Posted: Mon May 17, 2010 6:31 pm
by Ciege
Support Team wrote:Also, we have major improvements planned for V3.0 Reporting, so if there are any suggestions or wishes this is the right location to post them
Couple of things I would like to see in reporting.
1) The ability to add a global Pass/Fail/Warning to the top of the report based on any failures or warnings in the entire log.
2) To add to #1 the ability to add number of pass/fail/warnings to the top and/or bottom of the log.
3) A way to group test results. In other words instead of a flat report add the ability to add group headers so that when you first review the report you can drill down or expand (with a plus/minus box) the test sections within the overall report.
4) To add to #3 allow the group headers to show a pass fail for the group when the group is collapsed.
5) An easy way to add different/more color schemes to the report based on different categories.
Sure I can come up with more but that was off the top of my head.
Re: report appending in 2.2
Posted: Tue May 18, 2010 9:03 am
by DirkB
Hi Michael,
I found an report item (table) that is successfully controlled by the xsl File
:
</fieldset>
<table border="0" cellspacing="0" width="100%">
<tr>
<th width="15%" >
<b>Line</b>
</th>
<th width="15%" >
<b>Time</b>
</th>
<th width="10%" >
<b>Level</b>
</th>
...
<xsl:apply-templates select="//message"/>
</table>
So I extended the xsl with a column "Line" Number.
But how can I fill this new column?
Probably within Report.Setup ?
By now Line will be filled with Time, Time will be filled with Level, Level will be filled with...
Best regards
Dirk
Re: report appending in 2.2
Posted: Tue May 18, 2010 10:42 am
by Support Team
Hi guys,
Thanks for the suggestions.
@Gunner: I attached a custom offline stylesheet; this does not use any http:// urls (so styles and images are local)
@Ciege: 1) to 4) are already, more or less, in our pipeline, so the new reports will have a (collapsible) tree structure and some kind of global summary (e.g. pass/fail/skip/block). The color schemes are a good idea; so basically you should be able to add a custom color mapping for given category name, right ?
@Dirk: Unfortunately, to do this, you need to jump through some hoops and do something like this:
Use
Report.LogHtml(..., BuildMsg("Your regular message", GetLine()))
with
string BuildMsg(string msg, string line)
{
return "<![CDATA["+msg+"]]>"+"<linenumber value=\""+line+"\"/>";
}
string GetLine()
{
StackFrame sf = new StackTrace(true).GetFrame(1);
return sf.GetFileName()+":"+sf.GetFileLineNumber();
}
and in the stylesheet, add a value selector for your new column:
Code: Select all
<td>
<xsl:value-of select ="./linenumber/@value"/>
</td>
You can add other custom information this way.
Cheers,
Michael
Ranorex Team
Re: report appending in 2.2
Posted: Tue May 18, 2010 1:23 pm
by DirkB
Hi Michael,
thanx a lot - it works!
A new column "linenumber" has been filled now.
So we can customize the report table extensively.
Best regards
Dirk