How to get ranorex report in uncompressed format and with html when we run the tests via Ranorex agent execution

Technology specific object identification, supported applications, web technologies, and 3rd party controls.
sudhamehar
Posts: 5
Joined: Thu Aug 23, 2018 12:38 pm

How to get ranorex report in uncompressed format and with html when we run the tests via Ranorex agent execution

Post by sudhamehar » Tue Feb 18, 2020 4:37 am

What I did :
  • I have created a executable build of my Ranorex project exe.
    I am executing with command line and on Ranorex agent using below command
    C:\Ranorex\ABC\ABC.exe /agent:ABCAgent
    When the execution is completed it is downloading Report.rxzlog
    So it is a compressed Ranorex report a single file. Which is by default it is generating with agent execution
What I need:
  • I want all files of Ranorex report. Not in compressed format. I want Ranorex report in .html, .html.data and all css, Xsl and required files
    So I am trying to unzip this .rxzlog file with command line using powershell script but I am not getting any result it is still giving file in .rxzlog
I tried below command to unzip it
$Path ="C:\Ranorex\ABC\ABC.exe /agent:ABCAgent /rf:c:\TestReports\report.html"
$Path ="C:\Ranorex\ABC\ABC.exe /agent:ABCAgent /zr /zrf:c:\temp\TestReports\report.rxzlog /rf:TestReports\report.html"
I have used these variables to pass it in this command in powershell to execute. Execution is good only problem is with report.
cmd /c $Path

Also, I expect this report properties should get from executable build and should produce the same type even via Ranorex agent execution but that is not happening .I don't know why

Can some one help how to get the uncompressed report and also in .html via command line with agent execution

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

Re: How to get ranorex report in uncompressed format and with html when we run the tests via Ranorex agent execution

Post by odklizec » Tue Feb 18, 2020 9:52 am

Hi,

I'm not using agents so I'm not quite sure if the custom path to report file, provided via command line, is carried to remote agent? I believe that the reports are always created at default (execution) place on remote machine (temp folder) and then they are downloaded to a local machine? Could you please try to specify HTML report, without using custom path? Just define the report name with html extension. And then examine the remote execution folder at C:\Users\%USERNAME%\AppData\Local\Temp\Ranorex\<randomID>. There should be created report file of your choice.

By default, Ranorex downloads junit and rxzlog files, but you can specify other files to be downloaded via parameter /artifacts. Please see the these user guide links...
https://www.ranorex.com/help/latest/ran ... execution/
https://www.ranorex.com/help/latest/ran ... norexAgent
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

sudhamehar
Posts: 5
Joined: Thu Aug 23, 2018 12:38 pm

Re: How to get ranorex report in uncompressed format and with html when we run the tests via Ranorex agent execution

Post by sudhamehar » Wed Feb 19, 2020 5:12 am

Hi, thanks for your reply.
I gave report.html and I have verified default report path as you mentioned but nothing is happened as expected

Yes, I have already seen in Ranorex guide to use /artifacts. It is just mentioned. How to do is not there in both the links.
If there is any example to use /artifacts to get other type of files will be helpful for me.

Now what I am looking is to extract files inside .rxzlog file using command line. if that can be done I can rename the required files to .html with commands
So I need a command which can extract the files inside .rxzlog

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

Re: How to get ranorex report in uncompressed format and with html when we run the tests via Ranorex agent execution

Post by odklizec » Wed Feb 19, 2020 8:13 am

Hi,

So Ranorex creates only rxzlog and junit files at the remote machine (via agent)? If there is not HTML created, then it's most probably not supported via agent execution, although it's kind of weird. But it's maybe not yet implemented agent functionality? This is something to ask a Ranorex support folks ;)

As for using /artifacts: parameter, it should be like this
/artifacts:*.FileExtA;*.FileExtB
Rxzlog and junit file should be copied by default, without the need to use "artifacts" parameter.

As for extracting rxzlog, basically, rxzlog is just a renamed zip ;) So your best option is to rename the file and use any zip-capable extractor to extract its content. Here are some C# code examples, how to extract files from zip:
https://docs.microsoft.com/en-us/dotnet ... ract-files
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

sudhamehar
Posts: 5
Joined: Thu Aug 23, 2018 12:38 pm

Re: How to get ranorex report in uncompressed format and with html when we run the tests via Ranorex agent execution

Post by sudhamehar » Thu Feb 20, 2020 1:25 pm

Hi, thanks for your reply again. Now i found some commands via powershell to extract the generated.rxzlog file and after extracting i can rename the .rxlog to .html and also .data file via commands

But what I found is that ranorex agent when it is generating ranorex compressed report it is corrupting some times. When we run the tests multiple times using ranorex agent one or two times it works as expected.
But other times it is executing all actions but at the end, report will be generated. When we try to open the report with report viewer or to unzip it throwing error "Failed to extract report file Size mismatch between central header and local header"

Did any faced this problem with ranorex agent compressed report.I am not able to extract due to some corrupted headers while it is generating. it is not consistently working

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

Re: How to get ranorex report in uncompressed format and with html when we run the tests via Ranorex agent execution

Post by odklizec » Thu Feb 20, 2020 1:40 pm

Hi,

Two things...
Are you using popupwatcher in your tests? If yes, then make sure all popupwatchers are terminated a the end of test.
And at second, try to end the test and save report before performing post-test steps (unzipping report and renaming files)...

Code: Select all

Ranorex.Core.Reporting.TestReport.EndTestCaseContainer();
Ranorex.Core.Reporting.TestReport.SaveReport();
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

gridle
Posts: 19
Joined: Mon Mar 10, 2014 5:13 pm

Re: How to get ranorex report in uncompressed format and with html when we run the tests via Ranorex agent execution

Post by gridle » Mon Aug 03, 2020 2:12 pm

sudhamehar wrote:
Thu Feb 20, 2020 1:25 pm
But what I found is that ranorex agent when it is generating ranorex compressed report it is corrupting some times. When we run the tests multiple times using ranorex agent one or two times it works as expected.
But other times it is executing all actions but at the end, report will be generated. When we try to open the report with report viewer or to unzip it throwing error "Failed to extract report file Size mismatch between central header and local header"

Did any faced this problem with ranorex agent compressed report.I am not able to extract due to some corrupted headers while it is generating. it is not consistently working
I faced with this.
I fixed it with using unique names for reports.