Savereport method not writing results to file on disk

Ask general questions here.
krish202
Posts: 4
Joined: Sat Mar 29, 2014 4:38 pm

Savereport method not writing results to file on disk

Post by krish202 » Sat Mar 29, 2014 10:24 pm

We are using VS2010 referencing ranorex libraries for our automation needs. We use testreport class to write to a html report for logging our executed test steps and test cases. What we notice or have experienced so far is that the testreport.savereport() does not always write to the .html.data file on the disk (.html.data file has no data once logging is done). Examining the activitystack just before savereport shows that the stack holds all the logging happened (testcase and test module activity) during the execution but not sure why it doesn't get saved on the disk. The testenvironment seems to have the correct values too.The puzzling part is, it works sometimes and doesn't other times.
Not sure where it is going wrong, but any help is appreciated.
Any other suggestions or better ways of writing report to the disk is quiet welcome.

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

Re: Savereport method not writing results to file on disk

Post by Support Team » Tue Apr 01, 2014 3:25 pm

Hello krish202,

Unfortunately we are not aware of such an issue.

May I ask you following questions?
  • Did you get any error message?
    Which Ranorex version are you currently using?
Regards,
Robert

krish202
Posts: 4
Joined: Sat Mar 29, 2014 4:38 pm

Re: Savereport method not writing results to file on disk

Post by krish202 » Tue Apr 01, 2014 9:09 pm

No, Don't get any error message back. We just recently upgraded to 5.0.1 and before we were using 4.1.2. Same result.
Is there anything in the testreport adaptor class we can check before calling savereport ?
Any other way of saving reports to file ?

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

Re: Savereport method not writing results to file on disk

Post by Support Team » Fri Apr 04, 2014 1:12 pm

Hello krish202,

You can try to add :

Code: Select all

TestReport.EndTestModule();
TestReport.EndTestCase();
Before you call TestReport.SaveReport();

This issue appears just sporadically?

Regards,
Robert

krish202
Posts: 4
Joined: Sat Mar 29, 2014 4:38 pm

Re: Savereport method not writing results to file on disk

Post by krish202 » Thu May 29, 2014 10:14 pm

Hi Robert,

We have those statements in the script but it did not help. Not sure what is causing but we figured a easy workaround. A small time delay before writing results to file on disk helped resolve the issue.

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

Re: Savereport method not writing results to file on disk

Post by Support Team » Fri May 30, 2014 10:21 am

Hello krish202,

Thank you for the information. I'm glad that you were able to resolve the issue.

Regards,
Robert