Skip to content

Commit abd5fd8

Browse files
committed
Document the web dashboard feature
1 parent 655d5e4 commit abd5fd8

File tree

2 files changed

+60
-0
lines changed

2 files changed

+60
-0
lines changed

docs/sources/next/results-output/_index.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,5 +20,6 @@ If you stream your metrics, you can either write them to a file, like JSON, or s
2020

2121
- [End of test summary](https://grafana.com/docs/k6/<K6_VERSION>/results-output/end-of-test)
2222
- [Real time results](https://grafana.com/docs/k6/<K6_VERSION>/results-output/real-time)
23+
- [Web dashboard](https://grafana.com/docs/k6/<K6_VERSION>/results-output/web-dashboard)
2324
- [Ways to visualize k6 results](https://k6.io/blog/ways-to-visualize-k6-results/)
2425
- [Build an output extension](https://grafana.com/docs/k6/<K6_VERSION>/extensions/create/output-extensions)
Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
---
2+
title: Web Dashboard
3+
excerpt: With the web-dashboard, you can track test results in real-time, and generate HTML test reports directly from your web browser.
4+
weight: 200
5+
---
6+
7+
# Web dashboard
8+
9+
k6 provides a built-in web dashboard running on the user's machine and enabling them to monitor their test results in real-time.
10+
11+
## Real-time test results
12+
13+
![Web dashboard screenshot](/media/docs/k6-oss/web-dashboard-overview.png)
14+
15+
The dashboard provides a real-time overview of the performance observed by k6 while a test is running, and helps to identify potential reliability issues as they occur.
16+
17+
## HTML test reports
18+
19+
The dashboard enables to generate detailed, downloadable HTML reports directly from the dashboard. These reports are self-contained, making them ideal for sharing with your team.
20+
21+
![HTML test report screenshot](/media/docs/k6-oss/web-dashboard-report.png)
22+
23+
The HTML test report can be accessed from the dashboard's menu, by clicking on the "Report" button.
24+
25+
![HTML test report generation button](/media/docs/k6-oss/web-dashboard-report-button.png)
26+
27+
## How to use
28+
29+
The web dashboard is a built-in feature of k6, and can be enabled by setting the `K6_WEB_DASHBOARD` environement variable to `true`. When used, the k6 run command will provide a link to the web dashboard in the terminal output:
30+
31+
```shell
32+
K6_WEB_DASHBOARD=true ./k6 run ../extensions/xk6-dashboard/script.js
33+
34+
/\ |‾‾| /‾‾/ /‾‾/
35+
/\ / \ | |/ / / /
36+
/ \/ \ | ( / ‾‾\
37+
/ \ | |\ \ | (‾) |
38+
/ __________ \ |__| \__\ \_____/ .io
39+
40+
execution: local
41+
script: ../extensions/xk6-dashboard/script.js
42+
web dashboard: http://127.0.0.1:5665
43+
output: -
44+
```
45+
46+
By default, when active, the web dashboard is exposed on localhost port `5665`. You can however configure.
47+
48+
## Dashboard options
49+
50+
The web dashboard can be configured using environment variables:
51+
52+
| Environment variable | Description | Default value |
53+
| ---------------------------------- | --------------------------------------------- | ------------- |
54+
| `K6_WEB_DASHBOARD` | Enable the web dashboard | `false` |
55+
| `K6_WEB_DASHBOARD_HOST` | Host to bind the web dashboard to | `localhost` |
56+
| `K6_WEB_DASHBOARD_PORT` | Port to bind the web dashboard to | `5665` |
57+
| `K6_WEB_DASHBOARD_PERIOD` | Period in seconds to update the web dashboard | `10s` |
58+
| `K6_WEB_DASHBOARD_OPEN` | Open the web dashboard in the default browser | `false` |
59+
| `K6_WEB_DASHBOARD_REPORT_FILENAME` | Filename to export the HTML test report to | `report.html` |

0 commit comments

Comments
 (0)