Ranorex Custom reporing

Ask general questions here.
Tnimni
Posts: 49
Joined: Thu Jan 02, 2014 4:03 pm

Ranorex Custom reporing

Post by Tnimni » Wed Jul 23, 2014 11:18 am

Hi,

I'm now working on generating Ranorex custom report.

i have encountered several issues.

1. C:\Program Files\Ranorex 5.0\Samples\CustomReportTemplate - contain RanorexReport4 files and not RanorexReport5 files. (I have Ranorex 5 installed)
2. I wanted to change some of the GUI elements, I discovered that all of the elements are located in a single resource named "RanorexReport4.png", Are you planning to make this a bit more easy to manipulate by creating a seprate resource for each GUI element?

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

Re: Ranorex Custom reporing

Post by Support Team » Fri Jul 25, 2014 3:31 pm

Hi Tnimni,

Thank you for the hint about the Sample files. I've already forwarded this to the responsible department.
If you create the Custom report Template via Test Suite Properties, the correct files will be generated.

Regarding the resource file:

We are of the opinion that the structure is better manageable if the individual elements are located in one single file.
If you have more than one file, the structure will get confusing.

Unfortunately there are no plans to change the handling of these resources.

Regards,
Markus (S)
.
Image

CThees
Posts: 3
Joined: Wed Jul 30, 2014 10:54 am

Re: Ranorex Custom reporing

Post by CThees » Wed Jul 30, 2014 2:26 pm

Hi,

I would like to append the issues I am encountering using custom reports, if I may.

I was expecting the default report format to be the basis for the automatically generated custom report template (following this instruction: support/user-guide-20/lesson-8-reporting.html#c4898). As a direct result, I would expect generated custom report to yield the same results as the default report if configured correctly. However, this does not seem to be the case, which is rather disappointing and - due to the lack of documentation using custom reports - confusing and difficult to work with.

Please compare the following:
1. Using the default report, my entire code to configure it is summed up in one line (which could itself be considered optional):
Report.CurrentReportLevel = ReportLevel.Debug;
Running an exemplary testcase results in 7 files to be generated:
DefaultReportResult.PNG
The resulting report using the default report.
DefaultReportResult.PNG (9.64 KiB) Viewed 814 times
2. Using the generated custom report consisting of the five files "RanorexReport5.css", "RanorexReport5.png", "RanorexReport5.xsl", "View.rxlog", and "View.rxlog.data", the setup code is a little longer (as seen here: blog/customizing-ranorex-reports):
// Set user defined stylesheet file
XmlLogger.SetReportStylesheetFile("./NewCustomTemplate1/RanorexReport5.xsl");  

// Setup reporting
string reportName = "Testset_" + System.DateTime.Now.ToString("yyyy-MM-dd_HH-mm-ss") + ".html";
Report.Setup(ReportLevel.Debug, reportName, true);
Re-running the test with the freshly generated custom report template and no other parameters being changed (except for the code being shown above) the result looks like this:
DefaultCustomReportResult.PNG
The resulting report using the generated custom report.
DefaultCustomReportResult.PNG (9.25 KiB) Viewed 814 times
The main difference here is that in case of the custom report, there is no *.data-file being generated. Instead, there is a "RanorexReport.xsl" in addition to the "RanorexReport5.xsl".

When I open the report file of the custom report evaluation, it shows only a blank page with the thumbnail image that has been generated during the test. The thumbnail expands to the large screenshot when clicked. However, no other data is shown.

So my question is: What do I have to do so that the custom report yield the same result as the default report?

From thereon out, I would like to start configuring my custom report, but first I need to get there. Any suggestions? Any questions?

Regards,
Clemens

CThees
Posts: 3
Joined: Wed Jul 30, 2014 10:54 am

Re: Ranorex Custom reporing

Post by CThees » Tue Aug 26, 2014 10:37 am

Hi again,

I am still stuck with the above situation. I always thought, this is a very active forum, so I'm wondering why nobody replied to this, yet.

Was my explanantion unclear? Do I need to specify anything in more detail? Then please let me know!
Or is there simply no solution for what I am asking for? In that case, I'd also like to know in order to adapt my ideas towards what is possible.

Thank you for your time!
Regards
Clemens

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

Re: Ranorex Custom reporing

Post by Support Team » Fri Aug 29, 2014 7:30 am

Hello Cthees,

Unfortunately, we have overlooked your forum post somehow.
In order to setup the Report environment correctly, please use following method:

TestReport.Setup()


For example:
string reportName = "Testset_" + System.DateTime.Now.ToString("yyyy-MM-dd_HH-mm-ss") + ".html";
TestReport.Setup(ReportLevel.Debug, reportName, false, true, 20,  path);

Please note that this blog post targets Ranorex 2.X reports!


Regards,
Robert
.
Image