Hi Team,
I am using Local data of Test studio for data driving my tests. How can I use only a single row of data Iteration from Local data table ?
for example : There are 5 row of data and I want to use only 3rd data row from grid. How can I achieve this ? Attaches Snap for example
Thanks
Abdul
5 Answers, 1 is accepted
Test Studio does not allow you to choose from the UI which data row to execute from a data source. However there is an approach to obtain non-iterative data binding within code. Here is a sample article how to do this.
I hope this will be helpful to you!
Regards,
Elena Tsvetkova
Telerik by Progress
Thanks Elena for the Information. I will look into the article you referred.
But it would be nice if this feature is directly implemented in Test Studio without depending on external data binding
Anyways thanks for the suggestion !!
Regards
Abdul
Thanks fro your feedback. I now reviewed your initial question again and I would like to point that if the single row is known before the execution the non-iterative data bind approach will not be required. Any external data you add to a test could be filtered as described in this article. I hope this will be helpful to you!
Regards,
Elena Tsvetkova
Telerik by Progress
Thanks for the solution Elena.
I have a query for you. Please refer attachment attached along this post
(1) Can i get the column names of binded test data table as shown in attachment ?
(2) Can i get the total column count of binded test data table as shown in attachment ?
Regards
Abdul
I am glad your initial issue is resolved.
About your further query there is a way to reach this values in an Execution extension. Here is a sample code you could include in the OnBeforeTestStarted() method:
var i = executionContext.DataSource.Columns.Count;
MessageBox.Show(i.ToString());
foreach (var ch in executionContext.DataSource.Columns)
{
MessageBox.Show(ch.ToString());
}
The idea is you could set global variables before the test has started and use them during execution. The above code displays in a message boxes the number of columns as well as the column names. I hope this will be a proper reference for you to accomplish your requirements.
Thanks for your cooperation in advance!
Regards,
Elena Tsvetkova
Telerik by Progress