Using CSV and TFS in a Ranorex Project

Ask general questions here.
daniel.maciasperea
Posts: 5
Joined: Fri Jul 08, 2016 1:07 pm

Using CSV and TFS in a Ranorex Project

Post by daniel.maciasperea » Fri Jul 08, 2016 1:39 pm

Hello,

I would like to share the problems that my team and I are experimenting working with Ranorex in a Version Controlled Project (with TFS) that uses CSV Files as Datasources just to know if anybody else has had these issues and has found a solution.
The problem is that Ranorex references the CSV Files used in the Test Case with its full path, for instance the CSV file that contains the Variables of TestCase01 is in: C:\Ranorex\ProjectXXX\TestCase01\datasource01.csv. This CSV file, as the whole project, is Version Controlled. If another member of the team, in a different computer with a different local workspace, checkouts the project, he will get an error when building it because Ranorex will try to find the file in the initial checked-in Path (absolute path from user1) instead of the “relative path”. We have tried different alternatives, as doing the check-in with Visual Studio, with Ranorex, inside the Project's Folder, outside it, etc.

Unfortunately, we have found no solution apart from Sharing a Folder or working with the same structure.

Thank you very much for your help!

Regards,

Daniel

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

Re: Using CSV and TFS in a Ranorex Project

Post by odklizec » Mon Jul 11, 2016 8:43 am

Hi Daniel,

Why don't you use relative path instead of absolute one? Simply, in the data connector settings change the absolute path with relative one. I'm personally using a 'Data' dir (located in project directory) in which I'm storing all necessary reference/data connector files). Then in data connector settings I'm using relative path like .\data\testcasename\dataconnector.csv. Of course, all files in data dir must have enabled an option to be copied to build dir (during build). Hope this helps?
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

daniel.maciasperea
Posts: 5
Joined: Fri Jul 08, 2016 1:07 pm

Re: Using CSV and TFS in a Ranorex Project

Post by daniel.maciasperea » Tue Jul 12, 2016 11:18 am

Hi Odklizec,

Thanks for the answer! We have already tested with relative paths, but the option “Copy File to Project” in Manage Data Sources overwrote always the relative path. But now we have used, as you recommended, the property “Copy to output dir - Always” and it is working fine.
Regards,

Daniel