k6 provides two ways to look at test results:
- After the test runs, k6 sends a small summary to stdout.
- For granular analysis and time-series data, you can also stream live test data to an external output.
By default, when a test finishes, k6 provides an end-of-test summary report. This report aggregates the test results, with information about all groups, checks, and thresholds in the load test. It also gives basic, summary statistics about each metric (e.g. mean, median, p95, etc).
For fine-grained analysis, you can stream all the data that your test generates (e.g. all HTTP requests) to an external output. This output might be a structured file format, like CSV or JSON. But you could also stream to another program, like Datadog or Prometheus, or pipe results to our managed k6 cloud service. The "External outputs" section lists all supported built-in outputs.
You have much room to handle the data in the way that best fits your use case. You can customize the summary report. In addition to the built-in, you can also make custom metrics.
Standard output
When k6 sends the results to stdout, it shows 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).
You can completely customize the output and redirect it to a file. You can also save arbitrary files with machine-readable versions of the summary, like JSON, XML (e.g. JUnit, XUnit, etc.), or even nicely-formatted HTML reports meant for humans! For more details, see the handleSummary() docs.
Test details
- execution: local shows the k6 execution mode (local or cloud).
- output: - is the output of the granular test results. By default, no output is used, only the aggregated end-of-test summary is shown.
- script: path/to/script.js shows the name of the script file that is being executed.
- scenarios: ... is a summary of the scenarios that will be executed this test run and some overview information:
- (100.00%) is the used execution segment
- 50 max VUs tells us up to how many VUs (virtual users) will be used across all scenarios.
- 5m30s max duration is the maximum time the script will take to run, including any graceful stop times.
- * default: ... describes the only scenario for this test run. In this case it's a scenario with a ramping VUs executor, specified via the stages shortcut option instead of using the scenarios long-form option.
End-of-test summary report
The test summary provides a general overview of test results. By default, the summary prints the following statuses to stdout:
- Aggregated values for the built-in metrics and custom metrics.
- Checks and thresholds.
- Groups and tags.
You can customize the summary shown to stdout, redirect it to a file or stderr, or build and export your own completely custom report (e.g. HTML, JSON, JUnit/XUnit XML, etc.) via the handleSummary() callback.
To learn more about the metrics k6 collects and reports, read the Metrics guide.
Trend metrics
Trend metrics collect trend statistics (min/max/avg/percentiles) for a series of values. On stdout, they are printed like this:
To change the stats reported for Trend metrics, you can use the summaryTrendStats option. You can also make k6 display time values with a fixed time unit (seconds, milliseconds or microseconds) via the summaryTimeUnit option. And, as mentioned above, you can completely customize the whole report via the handleSummary() callback.
Export summary
To get your aggregated test results in a machine-readable format, you can export the end-of-test summary report to a JSON file. This helps with things like integration with dashboards, external alerts, etc.
We recommend the handleSummary() callback. It lets you customize the end-of-test summary and export the report data to any desired format (e.g. JSON, CSV, XML (JUnit/xUnit/etc.), HTML, TXT, etc.).
You can also use the --summary-export flag, though we now discourage using it).
External outputs
If you need more data than what is condensed in the end-of-test summary, you can integrate and visualize k6 metrics on other platforms.
To send granular results data to an external output, use the --out flag.
The available built-in outputs are:
Multiple outputs
You can also send metrics simultaneously to several outputs. To do so, use the CLI --out flag multiple times.