Using the browser recorder
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
- 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.