On Web Load Testing

How a user session is recorded and replayed

As I wrote before, to load test a web site you need to record a sequence of actions that constitute a single user session on the site. Then when you run the test, this session it repeated by many virtual users running simultaneously.

Let’s look more closely on what does it mean to record a session. One would think that WAPT should record all the actions you perform at your computer using the mouse and keyboard. This approach would probably work, but it would be hard to replay such session in the test, because WAPT would need to emulate the full system environment for each virtual user. How many simultaneous users your system would be able to create in that case? If your browser normally consumes only 5% of the CPU time and RAM on your system, you would be able to overload it with just 20 users running 20 browsers. This is hardly a good performance for a load testing tool.

That is why WAPT does not run any browsers when performing the test. And that is why it does not record keyboard strokes and mouse movements. Instead of that it records the sequence of HTTP requests that your browser sends to your web site while you working with it.

In fact, all your actions in the browser window (when you fill forms, click links, buttons and use any other controls on web pages) are transformed into HTTP requests that are sent to the web site. These requests can transfer some data inside them. For example, when you login to a web application, you enter your user name and password in a form on the login page. When you click the “Login” button, the form is submitted to the web site. This is usually done by a POST request that contains all the form fields (user name and password in our case) as parameters.

When you record a profile, WAPT saves each and every request sent to the site along with all the data contained in the parameters. When you execute a test with the recorded profile, WAPT will send same sequence of requests to create a copy of the recorded session. What is most remarkable is that it can change the parameter values for each session it creates. So, different virtual users can use different names and passwords.