Export a report as .html-file

Best practices, code snippets for common functionality, examples, and guidelines.
Gilbert
Posts: 10
Joined: Mon Sep 30, 2013 8:54 am

Export a report as .html-file

Post by Gilbert » Wed Apr 09, 2014 11:36 am

Hey Support team,

I want to export a report as a .html-file. Normally, Ranorex exports also the html.data-, report.css-, report.xsl-files to the same location as the .html-file, so that it can be display. Due to data privacy purpose, i don't want to publish the .html.data-file. Doest is give any way to overcome the publication of the .html-file. It will be great.

Thanks alot!! :-)
Greets,

Gilbert

User avatar
odklizec
Ranorex Guru
Ranorex Guru
Posts: 3921
Joined: Mon Aug 13, 2012 9:54 am
Location: Zilina, Slovakia

Re: Export a report as .html-file

Post by odklizec » Wed Apr 09, 2014 12:32 pm

Hi Gilbert,

I don't think there is a way to expert report to HTML without html-data file. Partial solution could be using compressed report format (rxzlog) and instruct people to examine the report files using Ranorex Report Viewer, which you can make accessible from somewhere (ftp, shared dir, dropbox, etc..).

Here is what you need to copy from Ranorex setup to make the report viewer standalone...
http://www.ranorex.com/forum/how-to-sha ... tml#p20000

The problem is that someone clever enough may still be able to figure out how to extract the data file from rxzlog. It's actually pretty simple. Just rename rxzlog extension to zip and extract the compressed files using any zip-compatible extractor ;)

I think the solution of your problem could be converting the report to PDF? I don't have any experience in this area, but there are several discussions on that subject. Check these posts:
http://www.ranorex.com/forum/report-as-pdf-t1211.html
http://www.ranorex.com/forum/pdf-report ... tml#p12842
http://www.ranorex.com/forum/exporting- ... t3648.html
Pavel Kudrys
Ranorex explorer at Descartes Systems

Please add these details to your questions:
  • Ranorex Snapshot. Learn how to create one >here<
  • Ranorex xPath of problematic element(s)
  • Ranorex version
  • OS version
  • HW configuration

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

Re: Export a report as .html-file

Post by krstcs » Wed Apr 09, 2014 1:28 pm

There is no way to publish the report file without the data file. The data file contains all of the information used to build the report, such as PASS/FAIL status, test case/module order, data set information, etc.

The two files cannot be separated and remain meaningful.


Besides that, if the people who are looking at your report don't have clearance to see the information IN the report, then they probably don't need to see the report at all.
Shortcuts usually aren't...

Gilbert
Posts: 10
Joined: Mon Sep 30, 2013 8:54 am

Re: Export a report as .html-file

Post by Gilbert » Wed Apr 09, 2014 1:38 pm

Hi odklizec,

thanks for reply :-). I 've already extracted the report as .rxzlog-file, but it doesn't really help me to protect the data and changing the ending to .zip ist not better :-( . I know how to export the report as a pdf-file. The problem here is, you cannot expand or collap Testcases, teststeps. You cannot check also the messages logged for the different report levels.
Any other idea?

Greets,

Gilbert

Gilbert
Posts: 10
Joined: Mon Sep 30, 2013 8:54 am

Re: Export a report as .html-file

Post by Gilbert » Wed Apr 09, 2014 3:30 pm

Hey Support Team,

I'm trying to export a report as a .html-file on a computer where Ranorex is not installed. The only good solution, that i've found is to copy the following files:
- Ranorex.Controls.dll
- Ranorex.Core.dll
- Ranorex.Libs.dll
- Ranorex.ReportViewer.exe
to the same location like my report.rxzlog-file. Are some licence agreements broken by this copy action?

Greets,
Gil

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

Re: Export a report as .html-file

Post by krstcs » Wed Apr 09, 2014 4:05 pm

The report is an HTML formatted file, with an XML formatted data file, so there is nothing to export.

You only need to send the following files to anyone who needs to view the report. You can zip the 5 files and send them to anyone:

<Report Name>.rxlog (rename to <Report Name>.html)
<Report Name>.rxlog.data (rename to <Report Name>.html.data)
RanorexReport5.xsl
RanorexReport5.css
RanorexReport5.png

If you rename the *.rxlog and *.rxlog.data files to *.html and *.html.data, respectively, they can be opened by any browser. I would recommend just changing your default report name in Ranorex to just be .html instead of .rxlog.

The only issue you may have is that security on the browsers might restrict running the scripts locally, so you may need to adjust your browser security to allow local scripts to run.

You could also publish them to a web server and just have everyone view them as web pages. This will allow you to not worry about the script issue or having to package and send the files to everyone.
Shortcuts usually aren't...

Gilbert
Posts: 10
Joined: Mon Sep 30, 2013 8:54 am

Re: Export a report as .html-file

Post by Gilbert » Thu Apr 10, 2014 7:07 am

Hey,
@odklizec, i missunderstood you a little yesterday. Of course it is possible to unzip the .rxlog-file. You don't even need to rename it to .zip-file

@ krstcs, like i said in the first post, i don't want to publish the .html.data-file, so to zip al the files is not the solution. I have the same problem, when i store all my files on a web server.

@Support Team Once again, my question from the last post but a little bit better formulated:
I'm trying to export a report as a .rxzlog-file on a computer where Ranorex is not installed. The only good solution, that i've found is to copy the following files:
- Ranorex.Controls.dll
- Ranorex.Core.dll
- Ranorex.Libs.dll
- Ranorex.ReportViewer.exe
to the same location like my report.rxzlog-file. Are some licence agreements broken by this copy action?

JToelstede
Posts: 55
Joined: Fri May 24, 2013 12:57 pm

Re: Export a report as .html-file

Post by JToelstede » Thu Apr 10, 2014 9:50 am

Hi together,

I will try to explain our (Gilbert and me) purpose with the Ranorex Report.

We build up a data driven testautomation where all of our data is stored in a csv-File included confidential data like the username and password.
During a testrun Ranorex logs all the data from databinding in the rxlog.data file which are later displayed in the default Ranorex Report.
So we used a custom report template to suppress the output of our testdata in the report.
It works fine but we still have the problem that the confidential data like the username and password are logged in the rxlog.data file.

Because of privacy purpose we couldn't send the report attached on any mail.

That's why we are searching for solutions to share the report without these confidential data. Here a list of known solutions:
1. To print the custom report as an pdf is one possibility but than we loose for example the option to open or close the teststeps in the report.
2. An other alternative is to write all log information in a separate log-file what ciege explained in an other post (http://www.ranorex.com/forum/report-as-pdf-t1211.html).
3. Send the compressed custom report (*.rxzlog). This option requires that everybody who wants to view the report needs the Ranorex ReportViewer installed which is explained in the post "How to share Ranorex Reports" (http://www.ranorex.com/forum/how-to-sha ... tml#p20000). This alternative is not 100 percent save but it is still better than sending the rxlog.data plain in a mail.

We are still searching for any other possibilities to share the report without the confidential data.
May be there is a property in Ranorex which could be set so that the data from data binding isn't logged in the rxlog.data file?
Do we break any Ranorex licence agreements when we distribute the Ranorex ReportView explained in the alternative 3.

Thanks a lot for help.

Best regards,

Jörg

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

Re: Export a report as .html-file

Post by krstcs » Thu Apr 10, 2014 1:37 pm

Maybe you shouldn't be using confidential data in your test set, then?

Using real-user data in test sets causes all sorts of problems and should not be done unless absolutely necessary. There are many ways to use data that LOOKS real, but isn't, that will give you the same test results without causing any privacy/security issues.

If this is username/password data, why not use a "test" user so you don't have to use anyone's real username and password in the test?


If you don't want test data in the report because of security/privacy issues, then you probably shouldn't be using the specific data you are using. It isn't just the report that has the data, your test data set also contains it, so if someone were to get hold of that you would have a similar problem.
Shortcuts usually aren't...

JToelstede
Posts: 55
Joined: Fri May 24, 2013 12:57 pm

Re: Export a report as .html-file

Post by JToelstede » Thu Apr 10, 2014 2:39 pm

Dear krstcs,

thanks for your replay which didn't contains any helpful information and no answer to our question. Sorry for that. :?
If it would be possible to use a "test" user we would have done it before and we wouldn't have this problem and this post wouldn't exist.

Our smoketest is running in our acceptance-test environment and it is running after each deployment in production.
Apart from that we actually didn't have a "test" user in production I wouldn't send these information via mail in a report file.

May be you have an other idea to solve the problem.

Many thanks,

Best Regards,

Jörg

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

Re: Export a report as .html-file

Post by Support Team » Fri Apr 11, 2014 1:22 pm

Hello Jörg,

Your issue seems to be related to data encryption. I created a forum post which addresses this topic.

Data Encryption

Regards,
Robert
.
Image

Gilbert
Posts: 10
Joined: Mon Sep 30, 2013 8:54 am

Re: Export a report as .html-file

Post by Gilbert » Fri Apr 11, 2014 3:20 pm

Hello Robert,

thank for u reply. We are reading actually the data from an excel-sheet and bind them to the modules-variables. The problem with the encryption's solution is, we must encrypt each time all the data and store them in the excel-sheet before the AUT is started and we must decrypt them also before they can be used.
With this solution, we must invest much efforts in the implementation. I was thinking, we can solve easier.
One of the solutions we found on this forum http://www.ranorex.com/forum/how-to-sha ... tml#p20000 is to copy some files and we still don't know, if licence agreements are broken. Are they or not?
Does somebody have any other idea how to export a report without publishing other files like .rxlog.data?
It will be nice!!

wish every body a nice week end,
Greets,

Gilbert

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

Re: Export a report as .html-file

Post by Support Team » Mon Apr 14, 2014 3:43 pm

Hello Gilbert,

It is officially allowed to copy the Ranorex Dll’s in order to execute the Ranorex Viewer. Hopefully that’s a suitable approach in order to overcome your issue.

Regards,
Robert
.
Image

Gilbert
Posts: 10
Joined: Mon Sep 30, 2013 8:54 am

Re: Export a report as .html-file

Post by Gilbert » Thu Apr 24, 2014 8:40 am

Hello Robert,

thanks a lot for your answer

Greets,
Gilbert

mzperix
Posts: 137
Joined: Fri Apr 06, 2012 12:19 pm

Re: Export a report as .html-file

Post by mzperix » Thu Apr 24, 2014 10:52 am

Hi Gilbert,

I think the solution would be to anonimize the sensitive data in your html.data file.

Since the html.data is a text file (actually an xml file), just make a script that finds and replaces the sensitive data with dummy data.

Would this be a solution for you?

Best regards,
Zoltan