Creating Realistic Load Tests with the Load Impact User Scenario Recorder

Posted by Grant Engle on Dec 29, 2016

The goal for any software developer when performance testing is to get back actionable data from their load tests.

In order to prepare your application and infrastructure for real-world traffic, you need to create user scenarios that mirror real-world behavior.

Instead of asking our users to write custom user scenarios in Lua from scratch, we created the Load Impact User Scenario Recorder. It’s a free extension on the Chrome Web Store.

red and white blur in mountains.jpeg

Before you start creating realistic user scenarios with the Load Impact User Scenario Recorder, you’ll need a Load Impact account. You can sign up for our free plan — which is free forever, if you choose — by clicking the button below.

The leading load testing platform for developers

Start free plan

5 tests per month with 100 concurrent virtual users

Here’s how to start creating detailed user scenarios right in your browser before you start running load tests.

1. Download the Load Impact User Scenario Recorder

All right. This is the easiest part of a pretty easy process.

If you haven’t already downloaded the recorder, head to the Chrome Web Store and download it now.

User scenario recorder Load Impact.png

Once you do that, you’ll see our crocodile eye logo populate on the right side of your navigation bar.

From there, click the Load Impact icon in the navigation bar, and you’ll see a dropdown box with two buttons: “Option” and “Start.”

Do yourself a favor and take a quick look at the Options button. Click it, and you’ll see a text box with the label “URL include patterns.”

You can configure the URL patterns here — separated by commas if you have multiple — that you want the recorder to capture. The default setting is for the recorder to capture everything:

http://*/*, https://*/*

Once you’re settled on what URLs to capture (most of our users roll with the default setting), you’re ready to record!

2. Start the recording and create the scenario

We recommend you go to the first page you want to test, select the scenario recorder next to the URL bar, click “Start recording” then refresh the page.

The reason behind that is you want the scenario recorder to capture the load time people will experience when they first navigate to your page or application, and refreshing the page adequately simulates that.

Pro tip: If you’re creating a user scenario where you expect users to come to your website or app from a news article or press release, then start your recording there.

Once you’re at a sensible starting point, simply click the red “Record” button in the recorder dropdown box.

Consider yourself as a brilliant movie director, and this is your way of saying “Action.”

Now, go through the process you want to test. It could be simple browsing through the site or app. It could be navigating through a login process. Or maybe it’s searching an item, adding it to a cart and completing a purchase.

It’s your load testing world. Live to the fullest and create the scenario based on what you know about your users. You should use Google Analytics and any other data you have to inform you on what exactly your real users are doing. The goal is to create scenarios that mimic what your users are actually doing.

Once you’ve completed the scenario, click the Load Impact icon on the navigation bar again to stop the recording.

From there, another tab will open in the browser taking you to your Load Impact account.

Select which Organization and Project you’re using in the Load Impact app and give the user scenario a name.

Now, you’re looking at the load script in our app.

3. Cleaning up the load script

You successfully recorded your user scenario, and now it’s neatly filed in your Load Impact account.

This step isn’t “necessary,” per se, so consider this a little tip that can make your life easier, rather than a requirement.

You’ll see lines like this scattered throughout your load script if you navigated through multiple pages.

http.page_start("Page 1")

http.page_end("Page 1")

http.page_start("Page 2")

http.page_end("Page 2")

And so on.

Load Impact IDE highlighted page 1.jpg

These lines signify when a page and its assets are initially loaded and when they’re finished loading.

If you navigated through multiple pages, we recommend replacing “Page 1,” “Page 2,” etc. with the name (or some kind of nickname) of each page.

That way, you’ll know exactly which requests are on each page when you come back and review your script later on — and you likely will down the road.

If you are testing a single page app, you may only see “Page 1.” As a best practice, you may want to add additional page starts/ends to group requests together.

Many of our users take this opportunity to clean up requests they won’t be able to optimize, such as marketing pixels.

For example, if you have the Facebook audience pixel on your site, the User Scenario Recorder will load those requests.

However, even if you find that the Facebook pixel’s VU load time is slower than you’d like, you won’t be able to optimize it — for the obvious reason that you don’t have control over Facebook’s infrastructure.

The common practice is to just remove these types of marketing pixels to avoid clutter in your load script.

4. Validating the user scenario

The next move should be to validate your user scenario by clicking the orange “Validate” button in the top right of the dashboard.

Validation means a single virtual user will execute the script to ensure there are no errors or unusable http calls in the user scenario.

Let’s say you see a 403 error when you validate your script. That’s the URL status code “Forbidden.” Seeing this error when you validate a load script means the virtual user could not access a URL, likely due to a lack of proper login credentials.


When you see this, simply click the error message on the right side of the dashboard, copy the URL, find it in the script and then investigate the cause accordingly.

Once you run the validation and only receive a message saying “Validation finished,” you’re ready to run your load test using this script.

Moving forward

Now that you’re armed with a realistic, intelligently labeled user scenario, you’re ready to configure your load tests and start learning about your website and/application performance like a pro.

The leading load testing platform for developers

Start free plan

5 tests per month with 100 concurrent virtual users

Topics: Performance testing, Load Testing

Posts by Topic

see all
Try a Free Test