How to plan realistic load test scenarios

The first question that pops up during load test planning is “how many users will use my application in parallel?” The second one is: “How will users engage with my application?” Meaning, what’s the exact scenarios? How many users will execute each scenario? What’s the location of the users? Which browser are they using? etc.

The issue, of course, is that users behave differently from one another – select different options, use different navigation paths, etc. You cannot be aware of all user interactions with your system, let alone test all of them. So how can you determine and plan your overall load scenarios and which user behaviors to include in them?

In a sense, a load test scenarios is like a conductor score, which outlines the musical parts of all the instruments in the orchestra – string, woodwind, brass and percussion. The music score used by the conductor has all these parts together. Just that with a load test scenario, you’re the one who needs to write that score!

music-score

Fortunately, unlike a composer, you don’t have to call the muse for inspiration. Instead, you just need to collect data to help you decide what will be the components in your load test scenarios. Yes, it’s easier said than done, but here are some possible ways –

  • Analyze application log files. While the files contain huge data volumes, they’ll still provide insight into usage scenarios.
  • Use a monitoring product, if available. This will not cover all usage scenarios but may still provide good information.
  • Talk to product managers and get their view and understanding of common usage patterns.
  • Extract info from other tools/logs, such as web browser usage, Analytics, mobile phones, etc.
  • Make educated guesses. Realistically, you’ll never have all the data you need and you’ll simply have to make some assumptions in regards to the most common activities, etc.

Combine all the data you collect and come up with the “right” mix of usage scenarios that may simulate real-life as closely as possible. Remember that like a composer, your initial load test scenarios are just a first draft. You can modify, remove, and add new parts as needed, once you learn from your experience.

WebLOAD, by the way, supports real-life load scenario needs. You can define a variety of scripts, browsers, and network characteristics in a single test run. Then, when executing scenarios, you can control the load build-up to mimic real-life conditions. Read more about this on this page, or you can always try WebLOAD and see for yourself.