Customizing Reports - Report Files

Ask general questions here.
Posts: 206
Joined: Wed Sep 16, 2015 10:55 am

Customizing Reports - Report Files

Post by stapes » Mon Jan 25, 2016 4:35 pm

I am currently investigating Customizing Reports with Ranorex Studio

Eventually I want to email the reports to various users at the end of each run.

I have been working through this article:

I have added this code to Program.cs:

Code: Select all

string logFileName = "Test.rxlog";

// set a custom stylesheet for the default XML report

// append to an existing file with the same name
Report.Setup(ReportLevel.Info, logFileName, true);
I have also set a Report File Directory & Report File (using placeholders), in Global Parameters > Report

Now, when I do a run from Ranorex Studio, I get 3 reports:

1. Goes to the /Reports folder - but does NOT have my Style-sheet format
2. Goes to bin/Debug folder - this one IS in the correct Style-sheet format
3. Goes to the designated ReportFileDirectory, has the placeholder name, but does NOT have the correct Style-sheet format.

I am well & truly baffled.

I would prefer my report to be in my chosen Style-sheet style, with the chosen Placeholder name.

I only need the one report.

I am less concerned about where it ends up, as I am running from Jenkins usually, & that is subject to it's own rules.

Ranorex Guru
Posts: 2683
Joined: Tue Feb 07, 2012 4:14 pm
Location: Austin, Texas, USA

Re: Customizing Reports - Report Files

Post by krstcs » Mon Jan 25, 2016 4:59 pm

I don't use custom XSL, so I'm not sure why that isn't working and can't help you there.

However, if you are using Jenkins, you could save the reports as *.html and * and have Jenkins publish them to Jenkins' own web server using the HTML Publisher Plugin. This will allow you to email just the link at the end of the job instead of emailing the whole report. This will also allow you to keep a copy of the report for all test job runs right in Jenkins where it is just a few clicks away.

There may be ways to publish the report files directly to an external web server as well, if you prefer that.
Shortcuts usually aren't...

Posts: 206
Joined: Wed Sep 16, 2015 10:55 am

Re: Customizing Reports - Report Files

Post by stapes » Mon Jan 25, 2016 6:06 pm

Thanks for the suggestion krstcs.

I want to push on with getting this method first.

However, I will work through your suggestion too.

It won't hurt to have understanding of both methods.