By default, the k6 run command prints runtime information and general results to stdout.
Standard output
When k6 displays the results to stdout, it will show the k6 logo and the following test information:
- Test details: general test information and load options.
- Progress bar: test status and how much time has passed.
- Test summary: the test results (after test completion).
Test details
- execution: local the k6 execution mode (local or cloud).
- output: - the output of the test results. The default is stdout.
- script: script.js shows the name of the script that is being executed.
- duration: 1m0s the test run duration.
- iterations: - the total number of VU iterations.
- vus: 100 the initial number of VUs that test will start running.
- max: 100 the maximum number of VUs that the test will scale.
Test summary
The test summary provides a general overview of your test result. The summary prints to stdout the status of:
- Built-in metrics and custom metrics.
- Checks and thresholds.
- Groups and tags.
To learn more about the metrics k6 collects and reports, read the Metrics guide.
Output of trend metrics
Trend metrics collect trend statistics (min/max/avg/percentiles) for a series of values. On stdout they are printed like this:
You could use the summary-trend-stats option to change the stats reported for Trend metrics.
Output plugins
k6 can send more granular result data to different outputs to integrate and visualize k6 metrics on other platforms.
The list of output plugins are:
Plugin | Usage |
---|---|
Amazon CloudWatch | k6 run --out statsd |
Apache Kafka | k6 run --out kafka |
Cloud | k6 run --out cloud |
CSV | k6 run --out csv |
Datadog | k6 run --out datadog |
InfluxDB | k6 run --out influxdb |
JSON | k6 run --out json |
New Relic | k6 run --out statsd |
StatsD | k6 run --out statsd |
Multiple outputs
You can simultaneously send metrics to several outputs by using the CLI --out flag multiple times, for example:
Summary export
Additionally, the k6 run command can export the end-of-test summary report to a JSON file that includes data for all test metrics, checks and thresholds.
This is useful to get the aggregated test results in a machine-readable format, for integration with dashboards, external alerts, etc.
Read more about the summary on the JSON plugin documentation