Multiple data sources in same test case

Best practices, code snippets for common functionality, examples, and guidelines.
theraviz
Posts: 43
Joined: Sun Apr 14, 2019 9:46 am

Multiple data sources in same test case

Post by theraviz » Mon Aug 19, 2019 1:45 pm

Hello,

I have a test case with multiple recordings. For this test case my input needs to be retrieved from 2 different data sources and then pass to the recordings as test data.

Now the issue is I am not able to retrieve data from different data sources at the same time. Only one data source will be working at a time.

Steps as follows

1. Created 1 test case with 2 recordings
2. Created 2 new Data Sources
3. Created 2 variables one each in 2 recordings.
4. Assigned the module variable in "Data Binding" section of each Data Sources.
5. Executed the test case.

And the result is only one variable is able to retrieve data from one data source and the other variable is showing default value only.

So please let me know how to retrieve values from 2 different data sources in the same test case on the same execution.

The attachment 1.JPG is no longer available
The attachment 3.JPG is no longer available
1.JPG
1.JPG (37.63 KiB) Viewed 174 times

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

Re: Multiple data sources in same test case

Post by odklizec » Mon Aug 19, 2019 2:00 pm

Hi,

There is currently no way to use multiple data sources in the same test case/smart folder at the same time. You must either merge the two data sources or somehow redesign your test suite, e.g. by adding a nested Smart Folder, from which will be obtained data from second data connector. Here is how it could look:

Code: Select all

[Test Case] <- data connector 1
|_[Smart Folder] <- data connector 2
    |_recording_a
    |_recording_b
    |_recording_c
However, this approach could be problematic, if either (or both) connector contains multiple rows.
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

theraviz
Posts: 43
Joined: Sun Apr 14, 2019 9:46 am

Re: Multiple data sources in same test case

Post by theraviz » Mon Aug 19, 2019 2:21 pm

Thank you Sir, yes this is not a feasible way but for the time being it solved my issue. Thanks again :)

qa-auto
Posts: 45
Joined: Mon Aug 05, 2019 10:46 pm

Re: Multiple data sources in same test case

Post by qa-auto » Fri Sep 13, 2019 2:43 pm

I just ran into this issue also. Great info. Thanks.