Recording Monitoring Scripts

Websites, web applications, and many APIs are usually hit from a web browser.

You can save time on monitor scripting by recording your browser’s activity with Speedway’s free browser extension. Recording browser activity while you use your site can save you from the chore of manually adding monitor steps to hit each of your pages or endpoints. Recording a script is especially helpful if your application has many complex flows or user journeys.

Installing the Loadster Recorder Browser Extension

The browser extension is called Loadster Recorder and is available for the Chrome and Firefox browsers.

The extension is called Loadster Recorder because Loadster is Speedway’s companion app for load testing all sorts of HTTP websites, web applications, and APIs. The browser extension was originally created for Loadster, but it supports recording for both Loadster and Speedway.

To install this free extension, go to the extension page for your browser, and install it the way you would any other browser extension.

This extension is open source and you can review the source code on GitHub.

Recording Monitor Steps

Create a new monitor with a Protocol Script or a Browser Script. Then hit the Record button.

As soon as you start recording, Speedway will try to communicate with the browser extension. If found, it will prompt you to open a new browser tab with the starting URL of the site you want to record traffic for. Only activity in this browser tab will be recorded by the extension.

Navigate through the site you are recording as a user normally would. Speedway will record your browser activity as a series of steps. When finished, stop the recording or close the browser tab of the site you were recording.

Filtering Monitor Steps

After you finish recording, Speedway presents you with all the browser activity it recorded. You can select and deselect the actions, domains, or content types depending on which ones you want to include in the recording.

It’s often necessary to filter out any 3rd party content, ads, static content, or any other content that you don’t want to monitor. This is more often the case for protocol scripts.

Once you complete the recording, Speedway turns the recorded browser activity into protocol steps or browser steps.

Recording Pitfalls

Many of the things you’ll want to do in your script dynamic: each time you call them, they may expect different parameters or return different values.

Simply recording browser activity and playing it back verbatim might not always do the trick.

After recording a protocol script, we recommend editing the protocol steps that were recorded. You might want to add validation, capturing, and unique data submission.

You may also want to edit the steps in a browser script.

In short, recording a script is a helpful starting point, but make sure you understand the script after recording it, and make any necessary changes. Be careful not to treat “record and playback” as a naive end-to-end monitoring approach.