Web Dashboard
k6 includes a built-in web dashboard that provides real-time visualization of your test results. The dashboard helps you monitor performance as your test runs and can generate downloadable HTML reports for sharing with your team.
Features
The web dashboard offers:Real-Time Metrics
Watch test performance live with updating graphs and statistics
HTML Reports
Generate self-contained reports for sharing and archiving
Zero Setup
Built into k6 - no additional tools or services required
Interactive Graphs
Zoom, pan, and explore metrics during and after test runs
Quick Start
Enable the web dashboard using theK6_WEB_DASHBOARD environment variable:
Dashboard Interface
The web dashboard displays:Overview Section
- Test progress - Visual progress bar and elapsed time
- Virtual users - Current, min, and max VUs
- Request statistics - Total requests, request rate, error rate
- Response times - Current p95, p99, and average response times
Metrics Section
HTTP Metrics:- Request duration (blocked, connecting, TLS, sending, waiting, receiving)
- Request rates and counts
- Error rates
- Iteration duration
- VUs over time
- Data sent/received
- Any custom metrics defined in your test
Thresholds Section
- Real-time threshold status (passing/failing)
- Threshold values and limits
- Visual indicators for threshold violations
Checks Section
- Check pass/fail counts
- Success percentages
- Individual check status
Configuration
Customize the dashboard behavior with environment variables:- Basic
- Advanced
- CI/CD
Configuration Options
| Environment Variable | Description | Default |
|---|---|---|
K6_WEB_DASHBOARD | Enable the web dashboard | false |
K6_WEB_DASHBOARD_HOST | Host to bind the server to | localhost |
K6_WEB_DASHBOARD_PORT | Port to bind the server to (use -1 to disable) | 5665 |
K6_WEB_DASHBOARD_PERIOD | Update frequency for metrics | 10s |
K6_WEB_DASHBOARD_OPEN | Auto-open dashboard in browser | false |
K6_WEB_DASHBOARD_EXPORT | Auto-export HTML report to file | “ (disabled) |
HTML Reports
Generate shareable HTML reports directly from the dashboard:From the Dashboard UI
- Run your test with the dashboard enabled
- Click the Report button in the dashboard menu
- The report downloads as an HTML file
From Command Line
Auto-generate reports when the test completes:Report Features
The generated HTML report:- Self-contained - Single file with embedded assets
- Interactive - Graphs are still zoomable and explorable
- Shareable - Email or upload anywhere
- Archive-friendly - Stores complete test history
Reports only include graphs if test duration exceeds 3× the aggregation period (default: 30 seconds).
Use Cases
- Local Development
- Team Collaboration
- CI/CD Integration
Monitor tests during development:Benefits:
- See results immediately
- Iterate quickly on test scripts
- Debug issues in real time
Example Test
Here’s a complete example showing the dashboard in action:test.js
- Real-time request metrics
- Threshold status (3 thresholds)
- Check results (3 checks)
- Custom metric (custom_wait_time)
- VU ramping stages
Tips and Best Practices
Dashboard won't exit after test
Dashboard won't exit after test
The k6 process waits while browser windows are open. To exit immediately:
- Close the browser window, or
- Set
K6_WEB_DASHBOARD_PORT=-1for CI/CD, or - Use
Ctrl+Cto force quit
Remote access to dashboard
Remote access to dashboard
To access the dashboard from another machine:Then access via
http://<server-ip>:5665Security Warning: Only bind to 0.0.0.0 in trusted networks.Dashboard performance impact
Dashboard performance impact
The dashboard has minimal overhead but can impact high-load tests:
- Increase
K6_WEB_DASHBOARD_PERIODfor very high RPS - Consider disabling for maximum performance tests
- Use
--outoptions for zero-overhead metrics collection
Organizing reports
Organizing reports
Create a structured naming convention:
Comparison with Other Outputs
- Web Dashboard
- Grafana Dashboard
- Grafana Cloud k6
Best for:
- Local development
- Quick visual feedback
- Sharing with non-technical users
- No additional infrastructure
- Only one test at a time
- No historical comparison
- Limited to test duration
Troubleshooting
Next Steps
End-of-Test Summary
Understand the default text summary output
Real-Time Streaming
Stream metrics to external services
Grafana Dashboards
Create advanced visualizations with Grafana
Custom Metrics
Add custom metrics to your tests