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

How to fetch Single data row from Local Data row

5 Answers 88 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Abdul Khader
Top achievements
Rank 1
Abdul Khader asked on 05 Jan 2017, 10:21 AM

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

Sort by
0
Elena
Telerik team
answered on 09 Jan 2017, 12:36 PM
Hello Abdul,

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
 
The New Release of Telerik Test Studio Is Here! Download, install,
and send us your feedback!
0
Abdul Khader
Top achievements
Rank 1
answered on 11 Jan 2017, 05:36 PM

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

0
Elena
Telerik team
answered on 16 Jan 2017, 09:34 AM
Hello 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
 
The New Release of Telerik Test Studio Is Here! Download, install,
and send us your feedback!
0
Abdul Khader
Top achievements
Rank 1
answered on 01 Feb 2017, 08:09 AM

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

0
Elena
Telerik team
answered on 03 Feb 2017, 01:59 PM
Hi 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
 
The New Release of Telerik Test Studio Is Here! Download, install,
and send us your feedback!
Tags
General Discussions
Asked by
Abdul Khader
Top achievements
Rank 1
Answers by
Elena
Telerik team
Abdul Khader
Top achievements
Rank 1
Share this question
or