This is documentation for the next version of K6. For the latest stable release, go to the latest version.
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
Note that the browser recorders don’t require a cloud account. For cloud users, refer to the Grafana Cloud instructions.
How to record
- Install the Chrome or Firefox extension.
- Open the extension by clicking the k6 logo.
- 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.
- Select Start recording to begin recording the current browser tab.
- When done, select Stop recording.
- Save the recorded script locally or in any of your cloud projects.
- 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.
- 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.