I have written a set of test which get exceuted using webii and VSTS (C# .net). I need to implement he following in code
1. The test should be repetable : I must be able to execute the same test n number of times (where n indictaes the number of run -can be preset)
2. Diffrent input for each run: I should be able to access a excel file from which i can have the inputs that are required for running the test e.g data values.
I went through this link http://www.telerik.com/automated-testing-tools/support/documentation/user-guide/data-driven-testing/add-a-data-source.aspx#Excel however wanted to implement the same in code.
6 Answers, 1 is accepted
You can write Coded Step for that, I hope you Know How to Write Coded Steps
Go through the Section
Also You can access the Data Like that using Code Steps
// You can reference the column by index
Pages.Google.QText.Text = (string)Data;
// Or by name
Pages.Google.QText.Text = (string)Data["Numbers"];
If you are using the free Telerik Testing Framework and Visual Studio, you will need to follow their directions for creating a data driven test.
If you are using Test Studio and want to implement data driven testing in code, you can follow Nitin's directions. They are exactly right (thanks Nitin).
@Nitin, I've granted you Telerik Points for assisting.
the Telerik team
Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Thanks for granting Telerik Points :)
Saket, I hope this helps
With your suggested approach. I am able to access the first row of the local data but not the second item.
Please let me How can I access the second and all rows after using code.
I am sorry to hear you are experiencing this issue. This is quite strange since once you specify the column all the data in it should be used. I am not able to reproduce such a behavior. Could you please create a sample project lets say towards Google where the issue is reproduced and send it over for further investigation.Regards,
the Telerik team
Test Studio Trainings
I want to fetch local data of second row.
is there any way to do this better..?
See attached file for understand properly