The k6-web-dashboard
is a command-line tool that enables the dashboard event file (saved during the previous k6 run) to be played back (and displayed in a browser). In addition to playback, it also offers the possibility to create a single file HTML report from the event file.
It is possible to convert the result saved by k6 JSON output to dashboard event file format. This way, the running result saved in JSON format can be displayed later (even on another computer) as a dashboard or a report can be made from it.
Precompiled binaries can be downloaded and installed from the Releases page.
If you have a go development environment, the installation can also be done with the following command:
go install github.com/grafana/xk6-dashboard/cmd/k6-web-dashboard@latest
Offline k6 web dashboard management
k6 web dashboard management that does not require running k6 (recording playback, creating a report from a recording, etc.).
-h, --help help for k6-web-dashboard
- k6-web-dashboard aggregate - Convert saved json output to recorded dashboard events
- k6-web-dashboard replay - Load the recorded dashboard events and replay it for the UI
- k6-web-dashboard report - Create report from a recorded event file
Convert saved json output to recorded dashboard events
The aggregate command converts the file saved by json output to dashboard format events file. The files will be automatically compressed/decompressed if the file extension is .gz
k6-web-dashboard aggregate input-file output-file [flags]
--period 1m Event emitting frequency, example: 1m (default 10s)
--tags strings Precomputed metric tags, can be specified more than once (default [group])
-h, --help help for aggregate
- k6-web-dashboard - Offline k6 web dashboard management
Help about any command
Help provides help for any command in the application. Simply type k6-web-dashboard help [path to command] for full details.
k6-web-dashboard help [command] [flags]
-h, --help help for help
- k6-web-dashboard - Offline k6 web dashboard management
Load the recorded dashboard events and replay it for the UI
The replay command load the recorded dashboard events (NDJSON format) and replay it for the dashboard UI. The compressed file will be automatically decompressed if the file extension is .gz
k6-web-dashboard replay file [flags]
--export string Report file location (default: '', no report)
--host string Hostname or IP address for HTTP endpoint (default: '', empty, listen on all interfaces)
--open Open browser window automatically
--port int TCP port for HTTP endpoint (0=random, -1=no HTTP), example: 8080 (default 5665)
-h, --help help for replay
- k6-web-dashboard - Offline k6 web dashboard management
Create report from a recorded event file
The report command loads recorded dashboard events (NDJSON format) and creates a report. The compressed events file will be automatically decompressed if the file extension is .gz
k6-web-dashboard report events-file report-file [flags]
# Visualize the result of a previous test run (using events file):
$ k6 run --web-dashboard=record=test_result.ndjson script.js
$ k6-web-dashboard replay test_result.ndjson
# Visualize the result of a previous test run (using json output):
$ k6 run --out json=test_result.json script.js
$ k6-web-dashboard aggregate test_result.json test_result.ndjson
$ k6-web-dashboard replay test_result.ndjson
# Generate report from previous test run (using events file):
$ k6 run --out web-dashboard=record=test_result.ndjson script.js
$ k6-web-dashboard report test_result.ndjson test_result_report.html
--open Open browser window with generated report
-h, --help help for report
- k6-web-dashboard - Offline k6 web dashboard management