Menu

Important: This documentation is about an older version. It's relevant only to the release noted, many of the features and functions have been updated or replaced. Please view the current version.

Open source

Using the browser recorder

The browser recorder lets you generate a k6 script based on a browser session. It’s available as an extension for Chrome and Firefox.

Before you start

Before you start, consider the following:

Note that the browser recorders do not require a cloud account. For cloud users, check out the Grafana Cloud instructions.

How to record

  1. Install the Chrome or Firefox extension.
  2. Open the extension by clicking the k6 logo.
  3. Choose where to save the auto-generated script.
    • To save it on your local machine, select I don’t want to save tests in the cloud.
    • To save it on any of your Grafana Cloud k6 projects, select Sign In.
  4. Select Start recording to begin recording the current browser tab.
  5. When done, select Stop recording.
  6. Save the recorded script locally or in any of your cloud projects.
  7. Edit your script as necessary. Depending on the type of load test, you might need to change different aspects of the script. Typical changes are for load options and to handle correlation and dynamic data.
  8. Run the test from the CLI or Grafana Cloud k6. For more about running k6, refer to the Running k6 guide.

Troubleshooting. Try the HAR converter

If you experience problems recording a request, try the HAR converter.

The Browser recorder uses the HAR converter under the hood. Like the Browser Recorder, the HAR converter creates a k6 script from the HTTP requests included in a HAR file.

The HAR converter can also record other tabs or pop-up windows, which the Browser Recorder cannot.

If the error persists with the HAR converter, please provide detailed information about the problem in a new issue.