Save report during runtime

Ask general questions here.
UgaAga
Posts: 69
Joined: Thu Mar 15, 2012 2:11 pm

Save report during runtime

Post by UgaAga » Thu Mar 20, 2014 11:50 am

Hi,
is it possible to buffer / save a report during the test execution?

Thanks!

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

Re: Save report during runtime

Post by Support Team » Fri Mar 21, 2014 3:07 pm

UgaAga,

In general Ranorex saves a temporary report file every 30 seconds during the runtime.
You can find the report file in the output folder of your test suite. If you want to see the report just copy the file and remove the "_tmp" string from the extension.
OutputFolder.jpg
OutputFolder.jpg (44.1 KiB) Viewed 944 times
You can also change the auto save interval in the Test Suite settings dialog.
TestSuiteSettings.jpg
TestSuiteSettings.jpg (133.16 KiB) Viewed 944 times
Regards,
Bernhard
.
Image

UgaAga
Posts: 69
Joined: Thu Mar 15, 2012 2:11 pm

Re: Save report during runtime

Post by UgaAga » Mon Mar 31, 2014 11:00 am

Hi,
thanks for your answer.
Is it possible to save the report by command for example in a code module?

Best regards

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

Re: Save report during runtime

Post by Support Team » Wed Apr 02, 2014 2:32 pm

Hello UgaAga,

Yes, you can use following line of code in order to save the report during runtime.

Code: Select all

Ranorex.Core.Reporting.TestReport.SaveReport();
Regards,
Robert
.
Image

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

Re: Save report during runtime

Post by krstcs » Wed Apr 02, 2014 3:13 pm

Robert, could you verify something for us:

I believe that if you use the /rf switch on the command line, the name used in that switch will be used for all reports generated, so if you use the save method that you noted, and then restart logging without changing the report name in your code (add an index "1", "2", etc. to it, for example) then the new log will over-write the saved one.

I think this is the same for the default name, but not sure since I use Jenkins to specify report names on the fly.

Is that correct?

Just wanted to make sure we all understood the side-effects.

Thanks!
Shortcuts usually aren't...

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

Re: Save report during runtime

Post by Support Team » Mon Apr 07, 2014 9:42 am

Hello krstcs,

I’m afraid that I’m not exactly sure what is meant by “restart logging”. That aside, it’s true that the specified name within the /rf-parameter is used for all reports generated within the test run. Therefore, only one report file is created, but no information gets lost.

Regards,
Robert
.
Image