When we do load testing, our goal is to emulate a real life situation when many users are trying to access our web site simultaneously. We know that the web site can serve one user without problems. We can check this easily with a browser, especially if we have a list of test cases at hand. This is called functional testing and we suppose that this stage is over.
We should also make sure that the site can handle concurrent user sessions. We can use 2 browser windows for that and check that still each user receives correct server replies and two sessions do not influence each other.
Ok. The last stage is a real load testing. Here we need to find out what will happen when 1000 users try to access the site simultaneously. Why 1000? It doesn’t matter. For some sites we need only 100, for some we want to make sure about 10,000. This is just an example.
So, what should we do? Of course, we will not run 1000 browser windows. Fortunately there are special load testing tools that can emulate the behavior of many real users and do this automatically. We will only need to specify how many users we want to emulate and, of course, what exactly each of these users will do on the web site.
Since we do not expect that every user will have a unique behavior, we can specify the behavior for a single user and make them all follow it. We can also specify several typical cases and use each one for a number of virtual users. For example, all customers of an online store can be divided to those who make purchases and those who just browse the site. We can create one profile for each of these types of users and add to the test 100 “purchasers” and 900 “viewers”. This will create a realistic emulation of our users.