locked
Web Performance Test iterations RRS feed

  • Question

  • I need to write a web performance  declarative test in which the user logs in only once in the iteration and in the subsequent iterations he just repeats the requests / steps following the login

    For example if the load test that contains the web performance test has say 5 iterations and runs with 1 user - then in the first iteration the user executes the login request and then performs the remaining requests after login and in the subsequent 4 iterations , the user does not login but just performs the requests after login , finally at the end of the 5th iteration the user logs out.

    How do I achieve this using a Web Performance declarative test.

    Thanks
    - Mrunal


    Mrunal

    Tuesday, February 28, 2012 4:59 PM

Answers

  • Record your Test as if you are running the first Iteration; Once VS2010 is done adding the web test to your project, locate the request you want to be repeated and insert a loop with a controlled value of 5 (interations). Other suggestion would be to insert validation rules to check if the user is already logged in. When True skip the login step for the other repeated steps.
    Tuesday, February 28, 2012 5:12 PM
  • You could also create a load test and execute it for 5 iterations. You need to make sure that you have two web tests, one which executes once and the other for the repeating calls. You can then make sure that in the test mix, the first test is added as initialization test and the second test is added to the mix.

    Thanks,

    Anuj


    http://www.anujchaudhary.com

    Wednesday, February 29, 2012 5:43 AM

All replies

  • Record your Test as if you are running the first Iteration; Once VS2010 is done adding the web test to your project, locate the request you want to be repeated and insert a loop with a controlled value of 5 (interations). Other suggestion would be to insert validation rules to check if the user is already logged in. When True skip the login step for the other repeated steps.
    Tuesday, February 28, 2012 5:12 PM
  • You could also create a load test and execute it for 5 iterations. You need to make sure that you have two web tests, one which executes once and the other for the repeating calls. You can then make sure that in the test mix, the first test is added as initialization test and the second test is added to the mix.

    Thanks,

    Anuj


    http://www.anujchaudhary.com

    Wednesday, February 29, 2012 5:43 AM
  • Thanks Anuj and jds66 . I will try this out.


    Mrunal

    Friday, March 2, 2012 2:33 PM