change dataset location

Ask general questions here.
mander95
Posts: 58
Joined: Tue Jun 21, 2016 7:35 pm

change dataset location

Post by mander95 » Tue Jan 24, 2017 5:27 pm

So I'm moving the test suite runner and the executable of my automation to another computer, but I have datasets that are bound to the Test Suite Runner and I want to be able to refer to either the same data bound set but in a separate location, or have it point to a new dataset altogether. Is this possible?

sergii
Posts: 30
Joined: Fri Jun 07, 2013 11:07 pm

Re: change dataset location

Post by sergii » Tue Jan 24, 2017 8:24 pm

Usually I include dataset (CSV files) into the same git repository.
So when Continuous Integration tool (Bamboo, Jenkins, or Travic CI) will pick the job and clone it to other machine, you will have the same relative path from your executable and/or to the project to the dataset file.
For example

Code: Select all

.\assets\analytics.csv
If you want to maintain one global Dataset file somewhere and change it depending on other circumstances - make sure to put it to web accessible location and reference using absolute path.
For example

Code: Select all

C:\analytics.csv
or

Code: Select all

http:\\my_shared_host_name\files\analytics.csv
I feel that first approach is being used more often than second.

krstcs
Posts: 2683
Joined: Tue Feb 07, 2012 4:14 pm
Location: Austin, Texas, USA

Re: change dataset location

Post by krstcs » Tue Jan 24, 2017 10:41 pm

First, files used by Ranorex for executing tests, including data files, should NEVER be used from a remote location (network driver, dropbox location, etc.). This is will break things and Ranorex is not designed for it.

Second, it sounds like you should be using a database instead of flat files. You need customized datasets at runtime, which is exactly what a database is designed for.
Shortcuts usually aren't...

mander95
Posts: 58
Joined: Tue Jun 21, 2016 7:35 pm

Re: change dataset location

Post by mander95 » Wed Jan 25, 2017 5:52 pm

Realized that I can put the files into a folder that multiple computers have reference to so the issue was solved by simply placing the datasets in this accessible folder and just referencing it. Thank you for the help.