Page 1 of 1

Savereport method not writing results to file on disk

Posted: Sat Mar 29, 2014 10:24 pm
by krish202
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.

Re: Savereport method not writing results to file on disk

Posted: Tue Apr 01, 2014 3:25 pm
by Support Team
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

Re: Savereport method not writing results to file on disk

Posted: Tue Apr 01, 2014 9:09 pm
by krish202
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 ?

Re: Savereport method not writing results to file on disk

Posted: Fri Apr 04, 2014 1:12 pm
by Support Team
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

Re: Savereport method not writing results to file on disk

Posted: Thu May 29, 2014 10:14 pm
by krish202
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.

Re: Savereport method not writing results to file on disk

Posted: Fri May 30, 2014 10:21 am
by Support Team
Hello krish202,

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

Regards,
Robert