Using k6 as a source for slow transactions - ICTU/quality-time GitHub Wiki

The results.json file must include specific fields to be valid for use in Quality-time. In particular, the JSON object must contain a contains field.

The correct JSON-output, Quality-time requires, is generated using the data that is passed to the handleSummary() function, see (https://grafana.com/docs/k6/latest/results-output/end-of-test/custom-summary/). For example:

export function handleSummary(data) {
  return {
    'summary.json': JSON.stringify(data), //the default data object
  };
}

The deprecated method k6 run --summary-export=summary.json produces an incompatible JSON summary.

wrong format

Pasted image 20250605134708.png

right format

Pasted image 20250605134806.png