Sham
Sham

Reputation: 840

Visual Studio Performance testing using test mix distribution

This is my first attempt towards performance testing and needs some help. I have been trying to figure out the best approach for my testing. Below is my case:

Used 6 use cases (web tests) with the distribution of 35, 25, 10, 10, 10 and 10 percentages respectively in my load test at a constant load of 10 users.

I assume that based on the distribution, I have prepared test data (XML) with 4, 3, 2, 2, 2 and 2 sets of data accordingly.

  1. I tried with the test iterations options setting it to 15. In this case, web tests don't execute in the distribution manner.
  2. Tried with test duration, even this doesn't execute in the distribution manner.

Sometimes the web test even doesn't get picked up while the load test is running! And sometimes web test run in indefinite order.

Do let me know if this any info required.

Thanks.

Upvotes: 0

Views: 57

Answers (1)

AdrianHHH
AdrianHHH

Reputation: 14076

Setting "Test iterations" to 15 will cause the test to stop after a total of 15 web tests have been run.

The test mix descriptions are provided in the Visual Studio panels where they are selected. Those descriptions are very clear and merit reading very carefully. They do not say that the web tests will be executed in exactly the ratios specified. They say that web tests will be started in a way that approximates the ratios. Additionally the web tests are chosen based on random numbers so there may be some variation on the exact numbers of tests executed.

Assuming (because the question does not say) that each of the ten web tests takes about 20 seconds to run then each virtual user (VU) can run three tests per minute. If the run duration is set to five minutes then the ten VUs will execute in total about 3 * 5 * 10 = 150 web test, i.e. 150 iterations.

The question anticipates that the test will run 4, 3, 2, 2, 2 and 2 web tests, or 15 in total. Taking the percentages 35, 25, 10, 10, 10 and 10 that leads to estimates of 5.25, 3.75, and four of 1.5 test. Obviously partial tests are not executed, so the actual numbers will go up or down depending on how the random numbers are generated. If the 20 seconds per test plus 5 minutes run time values are taken then the 150 iterations should cause approximately 52, 37 and four of 15 web test runs. But these values are just estimates and if the tests have different run times (i.e. some are much quicker than others) then the numbers can be quite different. So read the test mix descriptions to understand how the percentages are used.

Upvotes: 1

Related Questions