This is a migrated thread and some comments may be shown as answers.

Multiple Test as Steps & Data Binding

1 Answer 140 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Maria
Top achievements
Rank 1
Maria asked on 18 Dec 2015, 01:00 PM

Hello

I have multiple test as steps set up each with Inherit Parent Data Souce selected so we can use and manipulate the data as we need to.

I have run into a bit of an issue with this currently as I am calling 2 test as steps which are both trying to use the same data source I have bound to the parent test which is failing as not all the fields the test as steps are looking for exist on the parent data source.

Is there any way to tell one of the test as steps to use its own data source binding or, if Inherit Parent Data Source is ticked, will it always look to the Parent regarless?

If that is the case I'm guessing im best off incorporating all of the bound fields the test needs into the Parents Data Binding?  I just want to know best practice really before I continue.

Thanks

Maria

1 Answer, 1 is accepted

Sort by
0
Cody
Telerik team
answered on 22 Dec 2015, 12:34 AM
Hello Maria,

When you have inherit parent data source checked then yes the subtest will always use the data from the parent instead of whatever the test is bound to. What you can do is uncheck inherit parent data source and then bind the subtest to its own data source. The side effect of this is that every time that subtest runs it will always use that data from the data source. And if you have multiple rows in your data source the subtest will run N times, where N is the number of rows in the data source, before returning to the parent test.

Another option you could take is that you can use code in the parent test to add data to the global data dictionary. Now the subtest will inherit not only the data contained in the data source but all of the data you set via code.

I hope this helps. Let me know if you need additional assistance.

Regards,
Cody
Telerik
 
The New Release of Telerik Test Studio Is Here! Download, install,
and send us your feedback!
Tags
General Discussions
Asked by
Maria
Top achievements
Rank 1
Answers by
Cody
Telerik team
Share this question
or