Hi,
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.
Help appreciated...
Thanks!!
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
http://www.telerik.com/automated-testing-tools/support/documentation/user-guide/coded_steps.aspx
Also You can access the Data Like that using Code Steps
// You can reference the column by index
Pages.Google.QText.Text = (string)Data[0];
// Or by name
Pages.Google.QText.Text = (string)Data["Numbers"];
http://www.telerik.com/automated-testing-tools/support/documentation/user-guide/data-driven-testing/local-data-driven-test.aspx
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.
Cody
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
Thanks
Nitin
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.
Help appreciated
Regards
Nawaz Ahnmed
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,Ivaylo
the Telerik team
Test Studio Trainings
Hello,
I want to fetch local data of second row.
is there any way to do this better..?
See attached file for understand properly