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
Using CSV and TFS in a Ranorex Project
-
- Posts: 5
- Joined: Fri Jul 08, 2016 1:07 pm
Re: Using CSV and TFS in a Ranorex Project
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?
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 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
-
- Posts: 5
- Joined: Fri Jul 08, 2016 1:07 pm
Re: Using CSV and TFS in a Ranorex Project
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
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