Creating scenarios in order to perform load tests is a major aspect of both deploying and improving Web applications. This aspect of load testing requires some imagination. If you’ve every played a role-playing game, it can be something of a similar exercise. The better you get at putting yourself in your users shoes (or finger tips), the better your tests will ultimately be. So, here’s some advice.
How to Record Scenarios with LoadUI NG Pro
The first thing to do is to determine what roles you will define for use in your test. A role is equivalent to a certain type of user that will visit the tested website, and the steps they will take while visiting.
If the tested site is a retail site, for example, you might have the following roles:
- Browse and leave
- Browse, add something to the cart and checkout
If your tested site is a restaurant site, your roles might look something like this.
- Browse menu and find directions
- Look at hours of operation and make a reservation
It’s best to choose at least three of the most common pathways through your site, and add a few uncommon routes as well.
Next, you need to break these roles down by percentage of traffic. A typical retail site may have 95% of users browsing and leaving, and 5% (or less!) actually making a purchase.
The combination of these two roles, or scenarios, will represent actual site traffic.
After each scenario is recorded, you need to verify it individually. This involves running a single virtual user for a single pass through the scenario. This step should never be forgotten!
Now you’re ready to start testing, which I’ll blog about next week. By recording scenarios that imitate actual user traffic, you’re setting the stage to greatly improve customer experience and, if you’re into ecommerce, get that percentage of purchases above 5%!