Data driven test using parameters from excel

7 posts, 0 answers
  1. Saket
    Saket avatar
    22 posts
    Member since:
    Sep 2011

    Posted 17 Jan 2012 Link to this post

    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  however wanted to implement the same in code.

    Help appreciated...

  2. Nitin
    Nitin avatar
    29 posts
    Member since:
    Oct 2010

    Posted 17 Jan 2012 Link to this post

    Hi Saket

    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[0];

    // Or by name

    Pages.Google.QText.Text = (string)Data["Numbers"];

  3. Cody
    Cody avatar
    3354 posts

    Posted 17 Jan 2012 Link to this post

    Hello Saket,

    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.
  4. Nitin
    Nitin avatar
    29 posts
    Member since:
    Oct 2010

    Posted 18 Jan 2012 Link to this post

    Hello Cody
    Thanks for granting Telerik Points :)

    Saket, I hope this helps


  5. Nawaz
    Nawaz avatar
    1 posts
    Member since:
    Jan 2013

    Posted 15 Mar 2013 Link to this post

    Hello Nithin,

        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

    Nawaz Ahnmed
  6. Ivaylo
    Ivaylo avatar
    782 posts

    Posted 20 Mar 2013 Link to this post

    Hello Nawaz,

    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.

    the Telerik team
    Quickly become an expert in Test Studio, check out our new training sessions!
    Test Studio Trainings
  7. Kavita
    Kavita avatar
    1 posts
    Member since:
    Mar 2017

    Posted 12 Apr 2017 Link to this post



    I want to fetch local data of second row.

    is there any way to do this better..?

    See attached file for understand properly 

Back to Top