Custom report template and relative paths

Ask general questions here.
User avatar
odklizec
Ranorex Guru
Ranorex Guru
Posts: 3930
Joined: Mon Aug 13, 2012 9:54 am
Location: Zilina, Slovakia

Custom report template and relative paths

Post by odklizec » Tue Feb 04, 2014 7:08 pm

Hi,

Based of this discussion, I recently started using Custom Report templates. In RX Studio, all works OK. I can successfully build and run both debug and release version of my tests.

I pushed my custom report template-related changes to SVN. Jenkins correctly triggered change, downloaded and updated the project files on Jenkins slave (WinXP64) and build a version. So far so good. The problem started after running the Ranorex project.

Here is the starting path as is used by Jenkins:
C:\Jenkins\workspace\litebox3d_32_64\lb3d_32_64\LB3D-Wxpp64sp2\win_b64\code\bin>.\..\..\..\Ranorex\xSpector\bin\release\xSpector.exe /pa:AUTStartPath="LiteBox3D.exe" /pa:AUTStartParam="-clean" /pa:AUTPID="LiteBox3D" /pa:TypeOfTest="smoke" /tcdr:Load_Files_CSV=1-2 /tcdr:Load_Large_Files=1-2 /tcdr:Load_PLMXML_Files=1-2 /pa:AppVersion=1.2.3 /zr /zrf:.\..\..\..\RXReports\Report_551.rxzlog
And here is the Ranorex log containing the failure:
Waiting for RX license...
RX license OK!
[2014/02/04 18:18:06.918][Debug ][Logger]: Console logger starting.
[2014/02/04 18:18:06.949][Failure][TestSuite]: The report file or directory could not be created. The custom report template directory 'C:\Jenkins\workspace\litebox3d_32_64\lb3d_32_64\LB3D-Wxpp64sp2\Ranorex\xSpector\bin\release\.\CustomReportTemplate\' does not exist.
[2014/02/04 18:18:06.981][Debug ][Logger]: Console logger stopping.
Here is how the custom template setting looks in studio:
CustomReportTemplate.png
CustomReportTemplate.png (98.35 KiB) Viewed 2288 times
Here is where is the CustomReportTemplate folder located in project.
CustomReportTemplate_2.png
CustomReportTemplate_2.png (67.08 KiB) Viewed 2288 times
So in my opinion, the problem is in this path, which definitely does not exists:
'C:\Jenkins\workspace\litebox3d_32_64\lb3d_32_64\LB3D-Wxpp64sp2\Ranorex\xSpector\bin\release\.\CustomReportTemplate\'

Here is the correct path:
c:\Jenkins\workspace\litebox3d_32_64\lb3d_32_64\LB3D-Wxpp64sp2\Ranorex\xSpector\CustomReportTemplate\

As you can see, the current working directory (xSpector\bin\release) does not contain the CustomReportTemplate. In my opinion, if the custom report template directory is defined by a relative path, it should be automatically included in the debug/release folder?

Is there something I can do with the current version, except defining an absolute path, which solution I would like to avoid? For example, is there a way to tell Ranorex to included CustomReportTemplate folder to debug/release folder?

Thank you in advance!
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

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

Re: Custom report template and relative paths

Post by Support Team » Wed Feb 05, 2014 3:00 pm

Hi odklizec,

In order to copy the customized report template to your debug folder, just add the folder to your project.
CustomReportTemplate1.png
CustomReportTemplate1.png (16.31 KiB) Viewed 2279 times
After that set the “Copy to output directory”-property of the files within the customized report folder to “Always” or “Preserve Newest”.
CustomReportTemplate2.png
CustomReportTemplate2.png (7.19 KiB) Viewed 2279 times
The folder will be copied either to the debug- or release folder depending on the configuration of your solution.
CustomReportTemplate3.png
CustomReportTemplate3.png (2.38 KiB) Viewed 2279 times
Regards,
Robert
.
Image

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

Re: Custom report template and relative paths

Post by odklizec » Wed Feb 05, 2014 3:09 pm

Hi Robert,

Thanks for the tip! I did not know there is such a possibility ;) In a meantime, I solved it by using xcopy command just before running the test. But your tip is a much cleaner solution. Have a nice day!
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

michael23
Posts: 9
Joined: Mon Jun 23, 2014 3:36 pm

Re: Custom report template and relative paths

Post by michael23 » Mon Aug 18, 2014 4:18 pm

Additional Question:

The build action will be added "\..\..\" to the report template folder path in the rxtst file in bin\* folder.
E. g. the value of my Report Template Folder in RanorexStudio will be "MyReportTemplate". When I compiled the solution and open the rxtst file in bin\Debug or bin\Release the path is look like "\..\..\MyReportTemplate"

How can I change this?

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

Re: Custom report template and relative paths

Post by Support Team » Thu Aug 21, 2014 12:25 pm

Hi michael,

I’m afraid that I do not fully understand your issue. May I ask you to explain your issue with a sample scenario?

Regards,
Robert
.
Image

michael23
Posts: 9
Joined: Mon Jun 23, 2014 3:36 pm

Re: Custom report template and relative paths

Post by michael23 » Wed Dec 10, 2014 5:53 pm

I can't refer to an relative path for the MyReportTemplate how is placed in an parent or parentparent folder.

E. g.:
+ParentParentFolder
++ReportTemplate
+++MyReportTemplate
++ParentFolder
++MyTestApp
+++MyTestApp.rxtst
+++...

I've solve this issue by copy the ReportFolder folder in the MyTestApp folder.

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

Re: Custom report template and relative paths

Post by Support Team » Thu Dec 11, 2014 3:58 pm

Hello michael23,

It should not be necessary to copy the report folder to your test app folder manually if you change the "copy to output directory" as Robert described in his previous post.
Please let me know why this is not working for you.

Regards,
Bernhard
.
Image