Testing practice, WAPT usage

On parameterization

To create a load test we record a typical user session with help of a browser and a load testing tool. We want to use that session as a template to emulate hundreds or even thousands users working with our web site simultaneously. Our load testing tool will replay the recorded session for each user that it emulates.

However we also want each virtual user to use a different user name/password pair. That is why after recording a profile with our session we need to parameterize it. In other words, parameterization specifies how to make a real new session from the template that we originally recorded.

Let’s see how this can be done. As an example I will use WAPT and the following web site: http://www.loadtestingtool.com/forum.

I recorded a very simple session in which a user simply logs in to the web forum. It consists of 4 page requests:

Forum login session

Even though last 3 requests use same URI, they have different sets of parameters. You can also notice that the third request uses POST method as specified in its properties, whereas other requests use GET. I select the POST request in the left view.

POST request with user name and password

Now we can see that the user name and password entered when recording the profile were passed as parameters of this request. They were recorded as static values. To parameterize our profile we need to modify the specification of these parameters.
I select the “UserName” parameter in the list and click the “Edit” button. What I see now is the “Edit Parameter” dialog.

Edit parameter dialog

In WAPT each parameter is specified as a concatenation of several functions. This is the most general approach that allows us to create complex values. However usually we need to use only one function, so I select the only line in the list and click the “Edit” button again.

Edit function dialog

Now I need to choose a function that will return a different user name for each virtual user. Initially the “Static text” function is selected, however as it is obvious from its name, it returns same text for each user. So, we should change it. I click the combo to see the list of available options.

List of functions

We will discuss all these functions some time later. By the way, a formal description of each one is available here.

I want to choose a function that will take a list of user names and will return elements from it one by one for each new virtual user. This function is called “Ordered list”.

I enter the names in the edit field in that dialog, one per line. If I used a long list, I could also specify a file to read the names from.

Ordered list function

After finishing with the user name parameterization I repeat the same procedure with the password. As a result both parameters are specified now as follows.

That’s all! Now if we execute our test with 3 virtual users, each will repeat same session, but will use a different name/password pair. What if we add 4th user? Since we specified only 3 values for the “Ordered list” function, when it reads to the end of the list, it will have to start from the beginning and the 4th user will login as “user1/pass1” again. If this is not acceptable for your test, you should simply add more values.


  1. Parviz Dousti

    How would this work if we do not know user’s passwords. e.g. when there is a single sign-on is in play?

  2. Pingback: How to analyze a load test report? Part 2: Test design problems.

  3. Hi Ivan, it is me again, thank you for this amazing tutorials!
    i have a question, there is a problem if the passwords are encrypted ? i am working with WAPT PRO 8.5 , and my passwords are not displayed in plain text in WAPT


    • I reviewed the log and seems like the user cannot login because the password is incorrect, but both users has the same password and i set an ordered list like the example above, i copied the encrypted password, (100101….) something like that. i reviewed the “request body” tab in logs and both users are sending the same password! but the difference is that after that the firs user set a cookie and login, and the second does not set this cookie and has an incorrect password message

      i don’t know why the second user cannot login!
      Thank you in advance

      • Hello Miguel,

        Please send your virtual user profile (.wpp file) to support@loadtestingtool.com.

        Also, please run the 2 sessions test with 2 users with full logging enabled. After the test is completed, save the logs (“File | Save logs” on the menu). Please also send the log files to the me to the above address. This will let me further suggest on the problem.


    • If you see that an encrypted password is passed as a parameter, you can try working with the encrypted form. You can also use JavaScript code to encrypt/decrypt them.

  4. During Stress testing – ramp up load : am increasing one user for every one minute ( upto 10 users).

    The first user saves one record in an application. The same record is keep on saved multiple times for all the 10 users it seems.

    My doubt:

    If the same record is keep on saved several times , it seems the records have been duplicated. I am seeing 32 records. How is it possible? how 32 records are saved with the same data.

    • Each virtual user executes sessions one by one. As soon as it completes a session, it starts the next one, and so on until the test is finished. So, each virtual user emulates several successive real users and can execute corresponding number of sessions during the test. At any moment the number of active concurrent sessions is equal to the number of virtual users. The more users you add, the greater load will be created against the web site. So, if you use the “ramp-up” option, in the beginning of the test you have small number of users, but it can grow throughout the test. Comparing performance characteristics (such as response time) for different test phases you can check if they degrade with higher load.

      In your test each user could execute several sessions and create several records in your system.

      If you have more doubts on this, please send your test source files (.wps and .wpp) to support@loadtestingtool.com.

  5. Thanks Ivan.

    What should i do to avoid this?

    Also, at that time I didn’t check the check box ‘Complete all open sessions’ – how is it related to the scenario which we discuss

  6. hi,
    I want to add different username and password to login every time
    where should i give values to the user and password
    pls help!!

Leave a Comment

Your email address will not be published. Required fields are marked *