Using a single data source for multiple test suites

Ask general questions here.
tmcpherson
Posts: 14
Joined: Tue Nov 08, 2016 4:24 pm

Using a single data source for multiple test suites

Post by tmcpherson » Mon Feb 27, 2017 9:54 pm

The product I am testing has various URLs, each of which point to a different version of the product. I will have many tests that will iterate over every one of these URLs. I would like to use an Excel data connector as a data source. That's easy enough to set up for one test, but what I would particularly like is a single file to be referenced as a data source in multiple test suites in multiple test projects. How feasible is this?

McTurtle
Posts: 297
Joined: Thu Feb 23, 2017 10:37 am
Location: Benedikt, Slovenia

Re: Using a single data source for multiple test suites

Post by McTurtle » Tue Feb 28, 2017 7:43 am

Hello Tmcpherson,

If you are going to do exactly what you wrote below, without accessing the Excel file from the network, I see no problem. You simply create a connector from each Solution pointing to a single Excel file that can be anywhere on your machine.

It could be a bit different, if you are planning to have the file on your network and multiple Ranorex solutions from different machines would try to access the file at the same time.

Can you describe in more detail, what you are planing to do?

Regards,
McTurtle

tmcpherson
Posts: 14
Joined: Tue Nov 08, 2016 4:24 pm

Re: Using a single data source for multiple test suites

Post by tmcpherson » Tue Feb 28, 2017 4:06 pm

Ah, I see what you mean. I actually did add the Excel file to multiple tests without checking the 'copy file to project' box. That worked. However, each test suite that referenced the Excel file referenced it by absolute filepath. That filepath is unique to my computer, and we deploy these tests to run in a cloud environment, so the connector broke there because the filepath wasn't valid.

I tried the same thing again, but this time I did check the 'move file to project' box. That also worked, but now there are multiple copies of one file. If I continue this, I'll have too many files to manage. What I really want is a single file that I can update in order to update all of my tests that reference that data.

I am using just one solution on my computer.

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

Re: Using a single data source for multiple test suites

Post by krstcs » Tue Feb 28, 2017 5:51 pm

Ranorex does NOT support running tests with any file on a network share or remote drive. Ranorex ONLY supports running tests with files on the LOCAL filesystem.

If you are running multiple tests on multiple systems you should probably be using a Continuous Integration (CI) system like Jenkins (recommended), Bamboo, or TeamCity. You should have a central storage location for the test file from which the CI system copies the files to the remote system and then runs the tests.

In addition, you should be using a Version Control System like git or Subversion. This will help with managing multiple copies of the same files and will save you from lost files (and lots of other bad stuff).


If you want to have one source of data for everyone, at all times, you should be using a database instead of files.
Shortcuts usually aren't...

tmcpherson
Posts: 14
Joined: Tue Nov 08, 2016 4:24 pm

Re: Using a single data source for multiple test suites

Post by tmcpherson » Tue Feb 28, 2017 6:54 pm

I actually specifically don't want to have a network file. I want to have a data source reference a file in a different project. These projects are in the same solution. Currently, I am the only person working on this particular solution, but we are using source control for it. When I make changes, I will of course commit them, and other people will pull them.

When multiple tests are distributed to the various systems, they take the file with them, so everything is still local. This is not literally a CI system, but it's similar.