1

I need to generate some delays to make a load test more realistic. In Visual Studio I have found 2 methods that delay execution of a transaction in a loadtest:

  • Convert to code

or

  • Set "Think Time" to first request in the transaction

What would be the best practice here. I am not completely sure that Visual Studio executes these test in sequencional manner, so 2nd option might return false results.

On the other hand, I would loose the ability to change settings from Visual Studios UI, if I generate code from a recorded test. And that increases time spent editing the test quite a bit.

Is there a better way than any of my methods?

TheBW
  • 1,405
  • 2
  • 11
  • 16
  • Think Time is definitely what you should use. I'm not sure what you mean by `I am not completely sure that Visual Studio executes these test in sequencional manner, so 2nd option might return false results.` but I suspect there is no problem there. Can you clarify? – agentnega Feb 19 '13 at 04:07

1 Answers1

0

I believe that the second way is more safier.

Just have in mind that the Think Time is aplied to each Test Run not to each contained Test. So, if you have a Load Test which contains more than one Tests in the Test Mix the Think Time will apllied at the end of the test run (when all included tests were completed).

Also, if you have more than one virtual user, since it's a load test, Think Time is applied to each user seperately. If, for example, you have 100 user then they will concurently start the tests but they may not finish them at the same time. Each user will wait according to the Think Time before starting the second test without waiting for the others to complete their first test.

chaliasos
  • 9,659
  • 7
  • 50
  • 87