locked
Load test user interference RRS feed

  • Question

  • Hi

    Lets say that I want to test a system where I log in and add and remove things to a cart and then log out.
    For this purpose I have created 100 active directory user accounts.
    Each web test session might vary between 30-60 seconds depending on response times and think time variations.

    I have the following settings in my load test setup:

    • Pattern: Constant
    • Constant user count: 100
    • Run duration: 30 min
    • Warm-up Duration: 0


    In this case web test session number 100 theoretically might be ready up to 30 seconds before web test session 1. As I have only 100 accounts the next thing that happens is that web test session 101 will log into account #1. This means that I will have two threads both logged into account #1, hence interfering with each other.
    Is there a way of geting around this problem without creating additional accounts?

    Thanks in advance!

    Monday, January 30, 2012 3:54 PM

Answers

  • Just to be clear you could still have login/out as part of the scenario, but its a lot more to set that up as spelled out in #2 above. I agree there is plenty of room for improving the data handling features out of the box to support more scenarios.

    -Robert


    http://blogs.msdn.com/rogeorge
    • Marked as answer by Stefan Stoffe Wednesday, February 1, 2012 9:05 AM
    Tuesday, January 31, 2012 7:36 PM

All replies

  • Hi Stefan,

     

    1. Simplest way is to always have a good surplus of test user accounts beyond the number of virtual users running in the load test.

    2. Next, you could have each virtual user login only 1 time, and never assume a new identity. Do this by creating a seperate test with the login steps, you can extract this directly to a new test from the UI. In the Load Test, you need to set this new Login test as the Initialize test - its a check box and selection in the UI. The only tricky part is that you have to bypass the call to the login test from inside the main test in your load test, you can use a Load Test Context parameter to do this and a conditional step around the call to the login test. If you dont do this, your initialize test will login, and then inside the test it will also call login. The User account/password data in a .csv file also needs to be bound in that login test, and set it to unique so no account gets reused. In that model, you only need a 1:1 mapping of users to VUsers.

    Robert


    http://blogs.msdn.com/rogeorge
    Monday, January 30, 2012 7:54 PM
  • Thank you Robert


    I think then I have to increase the number of user accounts because I want to have log in/out as a part of my test sequence. Isn’t it strange, however, that it is not an option to have one user/row in csv allocated to one user account all the time, then it would not be a problem.


    Thanks.

    Tuesday, January 31, 2012 9:07 AM
  • Just to be clear you could still have login/out as part of the scenario, but its a lot more to set that up as spelled out in #2 above. I agree there is plenty of room for improving the data handling features out of the box to support more scenarios.

    -Robert


    http://blogs.msdn.com/rogeorge
    • Marked as answer by Stefan Stoffe Wednesday, February 1, 2012 9:05 AM
    Tuesday, January 31, 2012 7:36 PM