Test iteration setting in loadtest using vs 2010

2019-02-15 20:10发布

问题:

I wanted to test my application for 250 concurrent users, I have some doubts about the load test setting.

What should be the correct setting to achieve the above...

  1. I have set the Max user count as 250 and test iteration in run setting as 1, So will it send 250 virtual request ???

    or

  2. I have to set the Max user count as 250 and test iteration in run setting as 250

回答1:

Here are some explanations about load test settings:

  1. In the Constant Load Pattern you set how the load test will create your virtual users.
    • If you Set Pattern = Constant then visual studio will create 250 virtual users without meaning that you need them. So if you have 250 users and only 10 Tests Iterations, only 10 users will send a request
    • If you set Pattern = Step you set an initial number of virtual users and they are increased at each test iteration by the Step User Count. Again, you may create more users form those you will actually need.
  2. In the Run Settings there are 2 basic settings you should focus:
    • The Test Iterations, which describes the total number of requests (tests) that will be executed from all the virtual users. So, if you set this value 500 and you have a Constant Pattern of 250 virtual users, then each user will send 2 requests. Perhaps some will send 3 and some others 1, but the total tests (requests) will be 500.
    • The Use Test Iterations setting which describes whether the test should be executed according to the Test Iterations settings (previous scenario) or according to the Run Duration setting. If you set this property to false, then all virtual users will try to execute as many requests/test as they can in the Test Duration time.

So, answering to your questions:

I have set the Max user count as 250 and test iteration in run setting as 1, So will it send 250 virtual request ???

No, it will send only one request. Set the Test Iterations = 250 if you want 250 total tests .

I have to set the Max user count as 250 and test iteration in run setting as 250

This will send 250 total tests but it doesn't mean that they will be concurrent. The 250 virtual user will not created at once, it depends of their initial number. So, if you want 250 concurrent tests you must set the Pattern = Constant.