How to copy a data sources from one test suit to another

Best practices, code snippets for common functionality, examples, and guidelines.
zlota
Posts: 1
Joined: Fri Jul 08, 2016 9:54 am

How to copy a data sources from one test suit to another

Post by zlota » Fri Jul 08, 2016 10:01 am

Hello everyone,

I have to perform 150 tests suite which will use the same data sources...
If there is any option to copy that data soursec in another way than manualy ? :)


Ola

jma
Posts: 111
Joined: Fri Jul 03, 2015 9:18 am

Re: How to copy a data sources from one test suit to another

Post by jma » Mon Jul 11, 2016 11:25 am

Hi,

One option would be storing all data sources at the same location. For example, you could store all data sources at C:\TestData\ and each data connector would refer to that location. In this case, you will only have one instance of each data source, which has the advantage of decreasing maintenance effort.

Note that I don't have complete insight into your test project. How you manage the data sources depends also on how you execute the tests on remote machines.

I hope that helps!

Ned612
Posts: 4
Joined: Mon Jul 11, 2016 2:13 pm
Location: United States

Re: How to copy a data sources from one test suit to another

Post by Ned612 » Mon Jul 11, 2016 2:43 pm

Hello zlota,

You can bind your data to a parent test case and keep all of your current test cases as children. These children test cases will have access to the parents data source.
2016-07-11 09_39_30-adasd - Ranorex Studio (Administrator).png
2016-07-11 09_39_30-adasd - Ranorex Studio (Administrator).png (12.71 KiB) Viewed 617 times
In the above example, this will run SubTestCase1, SubTestCase2, and SubTestCase3 with datarow 1 then run across all 3 subcases again with datarow2 and so on...

I hope this helps!

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

Re: How to copy a data sources from one test suit to another

Post by krstcs » Mon Jul 11, 2016 2:47 pm

To answer your actual question, no, there is no way to do this other than manually. Even with @jma's proposed solution, you would still need to create each test suite's data connectors manually in the test suite and test cases.

In a future release of 6.X, there are plans by the Ranorex team to change the way data connectors work so that they are better able to handle things like this, but until then you will need to create them manually.
Shortcuts usually aren't...