Reputation: 65
I have an end-point, let's call it https://www.ajax.org/api/v1/offers.
The scenario is that 80.000 users will access this end-point one time each, and they will all make this one request within 60 minutes.
How exactly do you model this in a VSTS Load Test?
Thanks in advance!
Upvotes: 0
Views: 121
Reputation: 14076
Create a ".webtest" that does the request.
The load of 80000 requests in one hour is about 1333 per minute, which is about 22 per second. (Check: 22 * 60 *60 = 79200 and 23 * 60 * 60 = 82800, so the 22 or 23 is about right.) If each request takes on average one second then will need 23 Virtual Users (VUs) to create the total load. If each request takes on average two seconds then would need about 46 VUs. (Check: (46 / 2) * 60 * 60 = 82800 and (45 /2) * 60 * 60 = 81000. So still about right.) Even though there is only one test must specify a test mix, so use "Test mix based on number of tests started".
Once the average request time is known when under load then its value can be used in the style above to set the required number of VUs.
Another approach starts with the above sums to find minimum numbers of VUs but uses a "Test mix based on user pace". Suppose we specify 100 VUs (which is normally considered a modest load). Then we need each VU to process 80000/100 = 800 webtests per hour and we just specify that 800 in the test mix window. -- On reflection this may be the better approach but I think the analysis above is useful.
To simulate 80000 different users ensure that the "Percentage of new users" is 100 in the scenario properties.
If you want exactly 80000 requests in the run then specify that as the "Number of iterations" in the "Run settings" along with "Use test iterations" set to "true". If you want about 80000 then I recommend setting "Use test iterations" to "false" and giving a "Run duration" of one hour.
Upvotes: 1