Click here to Skip to main content
15,881,715 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi

I am trying to loop through a web request a fixed number of times, but because my web test is data bound , all the requests are run the number of times as there are records in a database.

My scenario is as follows:
I have to validate web request-1 for the first 10 records in the database and web request-2 for the next 10 and so on. But presently, due to data binding all the requests are run for all the records in the database. Can I do something like restricting the web request to run only for a fixed number of times depending on some conditions? If yes, please hint on how I can do it!!

Thanks in advance!!
Posted

1 solution

Without knowing the technology that your using...can't you modify the datasource for each request to only return the records you want to bind against?

So if you're binding to a SQL database currently using this for all requests:
SQL
SELECT Id, FirstName,LastName,EmailAddress FROM Contact


Simply modify to this for Request 1
SQL
SELECT TOP 10 Id, FirstName,LastName,EmailAddress FROM Contact


Simply modify to this for Request 2
SQL
SELECT TOP 10 Id, FirstName,LastName,EmailAddress FROM Contact WHERE Id>10


etc.

If you binding against an XML document referenced by filename, then segregate the different result sets into distinct files.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900