Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -303,6 +303,20 @@ Of course, we always welcome [PRs to the jslib](https://github.com/grafana/jslib

## Summary data reference

{{< admonition type="caution" >}}

k6 v1.5.0 introduced a new format available for the end-of-test aggregated statistics object, designed for easier integration
with external systems and analytics pipelines.

You can use the new format via the `--new-machine-readable-summary` flag or the `K6_NEW_MACHINE_READABLE_SUMMARY`
environment variable.

The JSON Schema definition for this object can be found in the [grafana/k6-summary](https://github.com/grafana/k6-summary)
GitHub repository. You can also use these definitions to generate types for the programming language of your preference. For example, [k6 uses it](https://github.com/grafana/k6/blob/master/internal/lib/summary/machinereadable/generate.sh) for Go with [cog](https://github.com/grafana/cog).

This new format will become the default in k6 v2.

{{< /admonition >}}
Summary data includes information about your test run time and all built-in and custom metrics (including checks).

All metrics are in a top-level `metrics` object.
Expand Down
7 changes: 7 additions & 0 deletions docs/sources/k6/next/using-k6/k6-options/reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -1165,6 +1165,13 @@ $env:K6_STAGES="5s:10,5m:20,10s:5"; k6 run script.js

## Summary export

{{< admonition type="note" >}}

k6 v1.5.0 introduced a new opt-in format available for summary exports, designed for easier integration with external systems and analytics pipelines. You can learn more details about it in the
[`handleSummary()` function](https://grafana.com/docs/k6/<K6_VERSION>/results-output/end-of-test/custom-summary/#summary-data-reference) page.

{{< /admonition >}}

Save 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, CI pipelines, etc.

Expand Down
Loading