Skip to main content

k6 Studio

k6 Studio is a desktop application that helps you quickly generate k6 test scripts using a visual interface. It’s designed to accelerate test creation by recording browser interactions and converting them into k6 code.

Key features

Browser recording

Record user flows from browser interactions and generate HAR files.

Test generation

Convert HAR files into customized k6 test scripts.

Script customization

Use rules to quickly iterate on script creation and refinement.

Visual debugging

Test and debug k6 scripts with request/response inspection.

Getting started

1

Download k6 Studio

Download the latest version for your operating system:
2

Install and launch

Install k6 Studio and launch the application.
3

Start recording

Click Record and configure your browser proxy to capture traffic.
4

Generate your test

Stop recording and generate a k6 script from the captured HAR file.

Recording user flows

k6 Studio records browser traffic through a proxy to capture all HTTP requests and responses.

Recording workflow

1

Configure proxy

k6 Studio automatically configures your system proxy settings when you start recording.
2

Perform user actions

Navigate your application in the browser, performing the actions you want to test.
3

Stop recording

Click Stop in k6 Studio to end the recording session.
4

Review captured traffic

Review all captured requests and responses in the Studio interface.

What gets recorded

k6 Studio captures:
  • HTTP/HTTPS requests and responses
  • Request headers and bodies
  • Response headers and bodies
  • Timing information
  • Cookies and authentication

Generating test scripts

After recording, k6 Studio helps you convert the HAR file into a k6 test script:

Customization options

Remove unwanted requests:
  • Static assets (images, CSS, JS)
  • Third-party domains
  • Specific URLs or patterns

Rules for script generation

k6 Studio uses rules to transform HAR files:
// Example: Filter out static assets
{
  "type": "filter",
  "pattern": "\\.(css|js|png|jpg|gif)$",
  "action": "exclude"
}

// Example: Correlate session tokens
{
  "type": "correlate",
  "extract": "sessionToken",
  "from": "response.body",
  "pattern": "token=([^&]+)"
}

Visual debugging

k6 Studio provides a visual interface for testing and debugging scripts:

Request inspection

View detailed information for each request in your script.

Response analysis

Inspect response headers, bodies, and status codes.

Variable tracking

See how variables change throughout test execution.

Error detection

Identify and fix issues before running full tests.

Example workflow

Here’s a typical workflow using k6 Studio:
1

Record login flow

Start recording and perform a login sequence in your application.
2

Generate initial script

Stop recording and generate a k6 script with default settings.
3

Customize with rules

Add rules to:
  • Extract the session token from the login response
  • Parameterize the username and password
  • Filter out static assets
4

Test the script

Run the script in k6 Studio to verify it works correctly.
5

Export and enhance

Export the script and add:
  • Custom thresholds
  • Multiple virtual users
  • Load ramping configuration
6

Run in k6

Execute the final script with the k6 CLI or in Grafana Cloud k6.

Common use cases

Record API calls from your application and convert them into load tests:
  1. Use your application normally
  2. k6 Studio captures all API requests
  3. Generate a test focusing only on API endpoints
  4. Add multiple VUs to simulate load
Capture complex authentication sequences:
  1. Record login process
  2. Extract authentication tokens
  3. Parameterize credentials
  4. Reuse tokens in subsequent requests
Test complete user journeys:
  1. Record checkout process
  2. Correlate order IDs and session data
  3. Add checks for successful completion
  4. Scale to multiple concurrent users
Rapidly create test scripts:
  1. Record a user flow
  2. Generate a basic script
  3. Use as a starting point for customization
  4. Iterate quickly with rules

Best practices

Record the minimal user flow you want to test, then use k6 code to add variations and load patterns.
  • Close unnecessary browser tabs
  • Disable browser extensions that make background requests
  • Focus on the specific flow you want to test
  • Start with a simple recording
  • Generate a basic script
  • Gradually add rules and customizations
  • Test after each change
k6 Studio generates a starting point. Enhance scripts manually to:
  • Add realistic think time
  • Implement complex logic
  • Add custom metrics
  • Configure advanced scenarios
  • Save rules and configurations
  • Track script changes in git
  • Document customizations

Limitations

k6 Studio records HTTP traffic only. WebSocket, gRPC, and other protocols require manual scripting.
  • Limited to HTTP/HTTPS protocols
  • Cannot capture client-side JavaScript execution
  • Binary protocols need manual implementation
  • Some dynamic content may require custom correlation logic

Documentation

For detailed k6 Studio documentation: grafana.com/docs/k6-studio

HTTP requests

Making HTTP requests with k6

Correlation

Extracting and using dynamic data

API testing

Load testing REST APIs

Grafana Cloud k6

Cloud-based test execution

Build docs developers (and LLMs) love