Multiple Test as Steps & Data Binding

2 posts, 0 answers
  1. Maria
    Maria avatar
    15 posts
    Member since:
    Oct 2011

    Posted 18 Dec 2015 Link to this post


    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.



  2. Cody
    Cody avatar
    3354 posts

    Posted 21 Dec 2015 Link to this post

    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.

    The New Release of Telerik Test Studio Is Here! Download, install,
    and send us your feedback!
Back to Top