Use 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.
The browser recorder does not require a Grafana Cloud account, however, having one will allow you to upload the auto-generated k6 scripts to your selected Grafana Stack.
Configure extension
To save the auto-generated k6 scripts to your Grafana Cloud account you need to have an active session in the cloud.
- Open the extension by clicking the k6 logo.
- Click Sign in.
- Proceed with signing in to Grafana Cloud.
- Select Grafana Stack and click Next.
Record session
- Open the extension by clicking the k6 logo.
- Click Start recording to begin recording the current browser tab.
- When done, click Stop recording. You’ll be taken to the app to review the recorded test script.
- Save the recorded script in any of your projects.
In case you’re encountering issues when recording long sessions, try using the HAR converter. The converter can also cover cases that browser extension does not support, for example, recording other tabs or pop-up windows.