How to finish one test before running a second iteration in Load test
I have a Data Driven .webtest for load testing the whole application Now,
I am having a small problem with number of users the way they are taking chunks of records out of my DB to run the script.
Database used by the script has hard coded ID for the transaction (as I guessed what the ID would be after each iteration finishes)
Now when I put this .webtest in a load test scenario and when more than 1 user is accessing the data from the Table my script uses, it gets out of sync. User-2 would start working on ID 3 while User-1 is still finishing off ID-1, is there a why to tell the .webtest to wait for the transaction to finish and then all users move to the next.
In other words, Is there a way to read the records sequentially during the load test and all the load test guys wait for every one to finish what they are working on and then move forward.
Any suggestions to solve this issue would also be helpful.
[955 byte] By [
khawaja] at [2007-12-29]
OK Here is what the data driven table looks like and this table resides on saperate DB then the application DB lets call it MyTestDB.
| ID | First | Last |
| 1 | Karen | Conway |
| 2 | Koganti | Pitale |
| 3 | Clarence | Kahan |
| 4 | Pam | Elders |
| 5 | Izzy | Nikaido |
Here is what the request looks like where I use these values
https://webnlb.qadeploy.local/portal/Person.aspx with
Query string parameter AddID=MyTestDB.Person_Info.ID
ID in the above request is pulled out of the MyTestDB and replaced in the above request. Since the load test on application under test starts off from a clean DB (Lets call it AppDB) and no person information is in the application AppDB I know the first person that I would add from my script would come at ID 1 in the AppDB. so in other words "Karen Conway" when read by the script as it runs would also appear at ID = 1 in the AppDB.
When I run this script say on 5 iterations every record is read once sequentially and person is added from MyTestDB in to MyAppDB no problem.
Now when more than one person is working ( in load test scenario )
Load test user 1 pulls the information say ID =1 and inserts that in the AppDB as .webtest runs at the same time Load test user 2 pulls the information and inserts ID = 2, now keeping the anticipated state of AppDB in your mind if load user one is still finishing the test on ID = 1 and load user two finishes it a bit earlier I want to conserve this state before Load user 2 starts on ID=3, I want load user to wait till load user one finishes the test and then both of them move forward, because if they get out of sync the guy left behind cannot catch up after that. Is there some kind of Sync points in the scripts so load test users are aware of each other. Hope I explained myself here. Because in my case the ID's I have parameterized in the requests being made are anticipating the state of AppDB at that point. Script would add a person in AppDB update some related info. then delete that person. And all load test users would do the same thing.