Hi all,
It seems that a child test case can only see its own data source. it cannot see its parent or grandparent's data source. I created a variable in the child recording module. But I would like to do data bounding to its parent's data source, that seems not possible. If I want to add the parent's data source to this child, then the original/another data source I created in the child will be gone. So it seems that there won't be possible to have multiple data sources in one test case either. I guess I am doing something wrong. There must be a way to let variables in one test case/recording module to use multiple excel files, right?
The reason I am asking that is I want to have a global data source I can bound variables from any recording module.
Another thing is I don't know how to remove a global parameter after I created.
Multiple Data Source in One Test Case or Use Ancestor's?
Re: Multiple Data Source in One Test Case or Use Ancestor's?
Hi,
You should definitely be able to bind variables from child test cases/recordings with data sources from parent test cases. I'm using I all the time. What's the structure of your solution?
Let's say the structure looks like this...
You should be able to bind a variable from recording 2 or 3 with values from data connector 1.
You should definitely be able to bind variables from child test cases/recordings with data sources from parent test cases. I'm using I all the time. What's the structure of your solution?
Let's say the structure looks like this...
Code: Select all
[TC1] data connector 1
|_recording-1
|_[TC2] data connector 2
|_recording-2
|_recording-3
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
Re: Multiple Data Source in One Test Case or Use Ancestor's?
Hi Pavel,
You are right. I can bind variables within children test cases to their parent's data source.
But it seems that one test case only can have one data source.

You are right. I can bind variables within children test cases to their parent's data source.
But it seems that one test case only can have one data source.

Re: Multiple Data Source in One Test Case or Use Ancestor's?
Yep, one TC can have only one data connector. However, it should be possible to replace the data connector in runtime using some code? I never did that, but I'm sure it was discussed here in the past?
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
- RobinHood42
- Posts: 324
- Joined: Fri Jan 09, 2015 3:24 pm
Re: Multiple Data Source in One Test Case or Use Ancestor's?
Hi guys,
You can set the data connector using the following code:
Cheers,
Robin
You can set the data connector using the following code:
TestCase testcase = (TestCase) TestSuite.Current.GetTestCase("TestCase"); var source = DataSources.Get("Connector"); testcase.DataContext.Source = source; source.Load();Hope this helps.
Cheers,
Robin