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.
5 Answers, 1 is accepted
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
Test Studio Trainings
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
Test Studio Trainings
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
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
