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

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

5 Answers 23 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Tanu
Top achievements
Rank 1
Tanu asked on 07 Feb 2013, 07:41 AM
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.

5 Answers, 1 is accepted

Sort by
0
Tanu
Top achievements
Rank 1
answered on 07 Feb 2013, 08:14 AM
I found "Non-iterative data driven testing". Will study this and will let you know if any help required.

Thanks.
0
Plamen
Telerik team
answered on 07 Feb 2013, 08:42 AM
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
0
Tanu
Top achievements
Rank 1
answered on 07 Feb 2013, 09:20 AM
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.
0
Plamen
Telerik team
answered on 07 Feb 2013, 10:23 AM
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
0
Alan
Top achievements
Rank 2
answered on 07 Feb 2013, 05:30 PM
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
Tags
General Discussions
Asked by
Tanu
Top achievements
Rank 1
Answers by
Tanu
Top achievements
Rank 1
Plamen
Telerik team
Alan
Top achievements
Rank 2
Share this question
or