Report data file file is missing

Class library usage, coding and language questions.
rotciv
Posts: 26
Joined: Mon May 12, 2014 4:25 pm

Report data file file is missing

Post by rotciv » Wed Jun 18, 2014 9:44 am

Hi All
I wonder if you could suggest how to make sure that report data file is always there
I run the test from api and logging using Report if Ranorex
sometimes it happens that the test crashes or being killed by the manager due to a timeout
Ranorex log with all screenshots is there but not the datafile hence the Reoprt file is not really readible
error "Data file (Report.html.data) or transformation file is missing" is given when opening the file

I thought that setting it up like that
TestReport.Setup(ReportLevel.Debug, outputLog + "\\Report.html", true, true, 1000);
would help as this is supposed to write with the interval every 1 second but it doesn't

So how to make logging with Ranorex Report being stable?
If test crashes I want to investigate what happened but I can not really.
or I should always use the second logger?

thanks,
Victor

User avatar
Support Team
Site Admin
Site Admin
Posts: 12145
Joined: Fri Jul 07, 2006 4:30 pm
Location: Houston, Texas, USA
Contact:

Re: Report data file file is missing

Post by Support Team » Fri Jun 20, 2014 3:39 pm

Hi Victor,

I unfortunately don't know what you mean with second logger may I ask you to describe it more detailed?
In general the data file should always be saved to the specified folder. In case you kill the process so Ranorex cannot stop the test in a proper way, which is not recommended, a *.rxlog.data_tmp file should be created. When you rename it to *.rxlog.data you should again be able to open the report.

Regards,
Markus

rotciv
Posts: 26
Joined: Mon May 12, 2014 4:25 pm

Re: Report data file file is missing

Post by rotciv » Thu Jul 10, 2014 8:37 am

hi Markus
I didnt know about recovery from the temp file
thanks for suggestions!

Kind regards,
Victor

rotciv
Posts: 26
Joined: Mon May 12, 2014 4:25 pm

Re: Report data file file is missing

Post by rotciv » Wed Sep 10, 2014 3:14 pm

hi Markus
I revisited the problem
at the time when I received your answer the problem was solved the other way so I didnt really follow it out (ie believed that there is such temp file and that in the future I would use it)

now I started to have the issue again
program takes too long to execute and it is killed programmaticly

process.Kill();

in the end I can not find any temporary data file (see the screen shot)
CaptureRanorexLogDirectory.JPG
maybe u are saving to some special directory (although I tried to find in the whole C drive and could not as well)
or something else needs to be configured in order to do it?

thanks,
Victor
You do not have the required permissions to view the files attached to this post.

User avatar
Support Team
Site Admin
Site Admin
Posts: 12145
Joined: Fri Jul 07, 2006 4:30 pm
Location: Houston, Texas, USA
Contact:

Re: Report data file file is missing

Post by Support Team » Fri Sep 12, 2014 2:38 pm

Hi Victor,

Is this the screenshot of the Reports folder or of the bin/Debug one?
Please also check if the temp report file is in the bin/Debug folder.

Regards,
Markus

rotciv
Posts: 26
Joined: Mon May 12, 2014 4:25 pm

Re: Report data file file is missing

Post by rotciv » Mon Sep 15, 2014 7:31 am

hi Markus
there is no debug directory

it is release executable written in Visual Studio and using inside Ranorex Report
if this executable goes to the end all files are created in the log directory

if this executable is killed half way through there is no data file as explained before

thank you for your help,
this problem is becoming really important as we are experiencing unexpected delays in the test which triggers timeouts, killing the process and inability to analyze Ranorex logs


Thanks,
Victor

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

Re: Report data file file is missing

Post by krstcs » Mon Sep 15, 2014 1:28 pm

You should not be using Process.Kill() to terminate the test executable. Kill() immediately terminates the process and does not allow Ranorex to close the open handle to the report's data file, which means the file is not saved, which is why you are not seeing a temp data file.
Shortcuts usually aren't...

rotciv
Posts: 26
Joined: Mon May 12, 2014 4:25 pm

Re: Report data file file is missing

Post by rotciv » Mon Sep 15, 2014 1:36 pm

ok thanks
is there any way to set up Ranorex report to save temp data file every X seconds or something?
I mean log4net for example is readible even id the process got killed
changing

Code: Select all

 TestReport.ReportWriteInterval =0
doesnt seem to change anything

I will see how to handle killing - it is other framework which is doing it when the timeout is reached

Regards,
Victor

User avatar
Support Team
Site Admin
Site Admin
Posts: 12145
Joined: Fri Jul 07, 2006 4:30 pm
Location: Houston, Texas, USA
Contact:

Re: Report data file file is missing

Post by Support Team » Wed Sep 17, 2014 12:34 pm

Hi Victor,

You can set the writeInterval when you initialize the TestReport with the following setup method: Setup Method.
Please let me know if this will fix the issue!

Regards,
Markus

rotciv
Posts: 26
Joined: Mon May 12, 2014 4:25 pm

Re: Report data file file is missing

Post by rotciv » Wed Sep 17, 2014 4:02 pm

hi Markus
it doesn't make any difference
I can not see any *.rxlog.data_tmp neither in log directory nor anywhere on drive C

I tried

Code: Select all

 TestReport.Setup(ReportLevel.Debug, outputLog + "\\Report.html", true,false,new Duration(1000));
or

Code: Select all

  TestReport.Setup(eportLevel.Debug, outputLog + "\\Report.html", true);
TestReport.EnableTracingScreenshots = false;
TestReport.ReportWriteInterval = 5;
both dont produce any data file after the process was killed after some execution time (ie in the middle)

thanks,
Victor

User avatar
Support Team
Site Admin
Site Admin
Posts: 12145
Joined: Fri Jul 07, 2006 4:30 pm
Location: Houston, Texas, USA
Contact:

Re: Report data file file is missing

Post by Support Team » Fri Sep 19, 2014 12:49 pm

Hi Victor,

I tried to reproduce your issue on my machine with Ranorex 5.1.2.
I therefore created a Ranorex solution in VS and executed it from another application where I close the Ranorex exe by using the Kill() method.
In my case the *.html.data_tmp file was created but not in the directory you specified for the report but in the output(root) directory of the "application" which starts the Ranorex test exe.
Could you please check if you can find the *.html.data_tmp file in the output(root) directory of the project which starts the Ranorex test exe?

Thanks,
Markus

rotciv
Posts: 26
Joined: Mon May 12, 2014 4:25 pm

Re: Report data file file is missing

Post by rotciv » Fri Sep 19, 2014 2:39 pm

hi Markus
thanks I found it indeed in the current directory / so it is already good and will help us
Is there a way to setup the test to save temp data file to the Log directory from the start?
The fact that it is not happening seems like a bug

Kind regards,
Victor

User avatar
Support Team
Site Admin
Site Admin
Posts: 12145
Joined: Fri Jul 07, 2006 4:30 pm
Location: Houston, Texas, USA
Contact:

Re: Report data file file is missing

Post by Support Team » Tue Sep 23, 2014 2:52 pm

Hi Victor,

I am glad you found the file :)!

I am afraid it is currently not possible to change the path for the temp data log file.
In case this is an important issue for you please send an email to [email protected] to discuss this issue in detail!

Thanks,
Markus