0

I could run some performance tests successfully with K6. However, I've been trying to generate a single summary report for each of the 4 scenarios at once, but I couldn't. The workaround is to keep a single scenario (comment the others or remove them), run the test and generate the summary report. Then, exchange the scenarios and repeat the previous steps.

Is there any approach that I could follow to generate 4 summary reports, each one for each scenario with a single run? I did that, but I got a single summary report without split the number for each scenario.

1 Answers1

1

Unfortunately this is not easily possible right now.

One creative solution to avoid manually commenting out and rerunning the script is to use an environment variable to conditionally enable certain scenarios. Take a look at this example on the forum.

The summary report is just the result of some handy calculations based on the test's metrics, but if you don't mind calculating those yourself all metrics have a default "scenario" tag, so you could filter the metrics per scenario in whatever output system or processing tool you wish to use. For example, you could do the calculations with jq if you export the results to JSON, or in a Grafana dashboard using InfluxQL, etc.

You also might be interested in recent changes to the summary report (tentatively landing in the upcoming v0.30.0), which will make generating the report much more flexible. Separating it per scenario isn't currently planned, but feel free to propose the feature in a GitHub issue and we can discuss it there (disclaimer: I'm one of the maintainers).

imiric
  • 8,315
  • 4
  • 35
  • 39