Multi level data driven tests

6 posts, 1 answers
  1. Tim
    Tim avatar
    3 posts
    Member since:
    Feb 2012

    Posted 07 Mar 2012 Link to this post

    Hey
    I have a problem trying to get one test to use data from the test that calls it.

    I think my problem is exactly descriped at
    http://www.telerik.com/automated-testing-tools/support/documentation/user-guide/data-driven-testing/multi-level-tests.aspx , under the header: "Data bound Test A calls Test B".

    Unfortunately I can’t seem to get Test B to use data from a source attached to Test A. If I don’t attach the data file to Test B but have it attached to test A, the test automatically fails. If I do attach the data file to Test B and have it attached to test A, the test does not automatically fail, but it will run test B ones for each row of Data in the data file before continuing with test A.

    The behavior I’m trying to get is that Test A runs multiple times (ones for each row in the data set) and test B uses the data appropriate for that iteration from the same data set.

    Any help would be welcome.

  2. Answer
    Plamen
    Admin
    Plamen avatar
    8 posts

    Posted 07 Mar 2012 Link to this post

    Hello Tim,

    All you need to do is to check the "InheritParentDataSource" property on the Test B. This will cause the subtest to consume/use all the data offered by the parent test(Test A), effectively passing that data in as a parameter for the subtest to use.

    All the best,
    Plamen
    the Telerik team
    Quickly become an expert in Test Studio, check out our new training sessions!
    Test Studio Trainings
  3. Patricia
    Patricia avatar
    1 posts
    Member since:
    Jul 2012

    Posted 24 Aug 2012 Link to this post

    I'm having the same issue.   I have the inheritparent data checked, however, when I'm in test B it won't let me enter the binding for the colum in Test A. I just upgraded to 2012.1.719.0  Any thoughts?
  4. Plamen
    Admin
    Plamen avatar
    8 posts

    Posted 27 Aug 2012 Link to this post

    Hi Patricia,

    The column names are not displayed in the Binding properties of the subtest. When you are binding a step from a subtest to its parent data source, you have to enter the column name manually. Please see this video for more information.

    Regards,
    Plamen
    the Telerik team
    Quickly become an expert in Test Studio, check out our new training sessions!
    Test Studio Trainings
  5. Zvi
    Zvi avatar
    2 posts
    Member since:
    Apr 2016

    Posted 17 May Link to this post

    Hi

    I'm facing the same problem.

    Since this video is no longer available, could you please explain how to enter the column name of the parent data source manually?

    Thanks,

    Zvi

  6. Elena Tsvetkova
    Admin
    Elena Tsvetkova avatar
    254 posts

    Posted 19 May Link to this post

    Hello Zvi,

    Thank you for contacting Telerik Support Team. 

    To manually add the column name expand the Bindings and type the name of the respective column in the field for Add coded data variable then click on the brackets and set it. In the attached screenshot the variable in question is named 'exVal'. 

    Please let me know if this information was helpful to you or further assistance will  be required. If so please elaborate more on your particular scenario. Thank you for your understanding and hope to hear from you soon! 

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