how to select another record if first record already exists in the application

6 posts, 0 answers
  1. Tanu
    Tanu avatar
    2 posts
    Member since:
    Jan 2013

    Posted 07 Feb 2013 Link to this post

    There is a field in my application which is data driven.
    Suppose data is like
    Col1
    a
    b
    c
    d

    Now application tries to insert record "a" in the application but if "a" exists in the application then I want to pick record "b" to insert in the application.

  2. Tanu
    Tanu avatar
    2 posts
    Member since:
    Jan 2013

    Posted 07 Feb 2013 Link to this post

    I found "Non-iterative data driven testing". Will study this and will let you know if any help required.

    Thanks.
  3. Plamen
    Admin
    Plamen avatar
    8 posts

    Posted 07 Feb 2013 Link to this post

    Hi Tanu,

    Please also take a look at the following article on how to Skip a Specific Iteration While Executing a Data-Bound Test and let me know if you need further assistance.
    http://www.telerik.com/automated-testing-tools/support/documentation/user-guide/code-samples/general/skip-iteration.aspx

    All the best,
    Plamen
    the Telerik team
    Quickly become an expert in Test Studio, check out our new training sessions!
    Test Studio Trainings
  4. Tanu
    Tanu avatar
    2 posts
    Member since:
    Jan 2013

    Posted 07 Feb 2013 Link to this post

    Hi Plamen. I want to do something like what is given here http://www.telerik.com/automated-testing-tools/community/forums/test-studio/general-discussions/increment-value-from-data-table-used-in-test-case.aspx

    I want to override that each row row should be overridden once it has been used in the application.
    So I hope the code mentioned there will work. I want to know one thing more, where I need to place that code in my script.

    The solution given in non-iterative data testing article needs the use to save the number in xml file. This is not feasible as evertime i want that number to be new. So every time i need to change that number which is not feasible. I want the record iterated should get deleted after execution.
  5. Plamen
    Admin
    Plamen avatar
    8 posts

    Posted 07 Feb 2013 Link to this post

    Hi Tanu,

    You need to add this code inside the BaseTest class, but not inside another method or coded step. Please see this article for more information on how to override the OnAfterTestCompleted method.

    Regards,
    Plamen
    the Telerik team
    Quickly become an expert in Test Studio, check out our new training sessions!
    Test Studio Trainings
  6. Alan
    Alan avatar
    6 posts
    Member since:
    Aug 2011

    Posted 07 Feb 2013 Link to this post

    I have had a similar situation like this in the past, but rather than overriding the current dataset, I've had success with ending the current iteration based on a condition.  See if this may help you.

    Alan
Back to Top