Contents ▼

Recording Scripts

Recording a script from your web browser is often the easiest way to get started.

Getting the Loadster Recorder Browser Extension

Recording is done with the help of the free Loadster Recorder Browser Extension, currently available for the Chrome and Firefox browsers.

After you’ve installed the extension in your browser, expand it from the Loadster icon in the toolbar.

Toggle the switch to Enabled when you are ready to share your browser traffic with Loadster for the purposes of recording scripts.

Enabling the Loadster Recorder extension

When enabled, the Loadster Recorder Chrome Extension sends your browser events to as well as localhost:1999, which is the port that Loadster Workbench listens on.

When you’re finished recording your script, toggle the switch back to Disabled or uninstall the extension so that your traffic will no longer be recorded.

Recording your browser events into a script

To start recording, open a new or existing script and hit Record.

Loadster will open a connection to the Loadster Recorder browser extension and start listening for traffic.

Enter the URL of the first page you want to record.

Watch the log to see what events are being recorded

When you hit Start Recording, Loadster will open a new browser tab to that location. Whatever you do in that browser tab will be recorded as an event and show up in the recording log.

Your browser traffic is recorded

Click Stop Recording when you’re finished.

Filtering which browser events should be included in your script

Many sites have a lot of 3rd party trackers and other content that you may not want in scope for load testing, and therefore you don’t want them in your load test script.

After you stop recording, uncheck any domains and/or event types that you do not want included in your script.

Previewing recorded browser events

When you click Add to Script, your traffic will be converted into steps and appended to the script.

A newly recorded Loadster script

Notice that many of the events have been folded up as resources of other events. For this reason, the number of steps added may not match the number of raw events that were recorded.

Best practices for successful script recording

Recording saves time, but it isn’t always perfect! Avoid the temptation to blindly record and play back scripts without reviewing them first.

When you record browser traffic, Loadster does its best to guess the relationship between pages and their resources. Typically, images and stylesheets are recorded as static page resources under the pages that requested them, rather than independent steps. However, there are cases when you may need to tweak the script after recording to get it just right.

Also, if you are testing a dynamic site with complicated interactions (such as an OAuth flow or a series of form submissions), the initially recorded script might need to be edited a bit to allow for repeated use. You generally wouldn’t want to submit the exact same recorded data over and over.

You may also want to delete recorded steps that you don’t want in your script.

Last of all, always play through your script with a single v-user before running a load test, to make sure the script runs as intended and you know what it’s doing!

Read more in Playing Scripts and Editing Scripts.