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

Test As Step with Data Bindings

3 Answers 150 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Paul
Top achievements
Rank 1
Paul asked on 11 Nov 2011, 08:16 PM
I have a test (called Refresh_Wrapper) that has a data binding to a .csv file with three rows.  The test correctly runs three times... once for each row in the .csv.

I created a sub-test (called Refresh_Params) which enters the .csv values into the application.  I call this sub-test from my main test.  Now my main test runs three times (correctly).  And I expected it to call the subtest once passing it the data value for that main test's iteration.  But it's calling the sub-test three times (once for each .csv row) within the first iteration of the main test.

In the project tab, I have the main test (Refresh_Wrapper) with DataEnabled checked.  The child test (Refresh_Parameters) has DataEnabled unchecked and InheritParentDataSource checked.

Is there any way to get the child test to run only once per parent test's iteration and to use the data value from the parent test's data binding?

3 Answers, 1 is accepted

Sort by
0
Plamen
Telerik team
answered on 15 Nov 2011, 02:47 PM
Hi Paul,

This behavior you are describing, where the child test executes all of its rows for a single row of the parent test, is expected if the child test is bound to its own data source (see screenshot).

When the InheritParentDataSource feature is checked, the child test inherits data from the parent test and execute just once for the current row of data before returning to the parent test. It will go through all the steps from the parent test and when it reach the child test again, it will execute the next row. Note that both tests must have DataEnabled property checked(see screenshot).

Please check this video to see how it works:

http://screencast.com/t/qS0T0Xqd

In this case the Google test is our parent test and for each iteration of its data source the child test iterates just once(the same row from the second column).

If you are still having trouble getting this to work, please record a video demonstrating the issue. Jing is a decent and free recorder.

Hope to hear from you soon!

All the best,
Plamen
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Ionela
Top achievements
Rank 1
answered on 06 Nov 2014, 12:22 PM
Hello,

Can you please tell me that is there any chance to use to a recorded step the binding data from the parent test?
For example
1. parent test is binding to DataSourceX
2. child test have DataEnabled on true, and InheritParentDataSource also on true 

How can in use, for a recorded step, a parameter from DataSourceX, from parent test.
 

 Now this is not possible, plese see the attached file.
  Thank you,  
Ionela 

0
Ivaylo
Telerik team
answered on 11 Nov 2014, 08:44 AM
Hello Lionela,

That should work as expected. You will need to click on the dropdown to see the properties that support data binding. Please refer to the screenshot attached.

However in your screenshot I can see some tests marked as dirty, which means you did not save the changes you have made.

Please note that is is a good practice to submit a new problem in separate forum thread instead of updating a 3 year-old thread. The product has changed significantly and it is very likely that you are experiencing completely different problem.

Thank you for your understanding.

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