Getting handleSummary file once k6 runner is completed

handleSummary() can generate result files at the end of each runner execution, but these files are not usable because the pod status changes to “complete” right after these files are created.

I would like to keep those files even after the end of pod. One possible need is to use it for the integration with XRay here
Since we trigger testing execution via Github Action, I’m searching for an automatic way to get that file and use it into that process.

I’m also wondering if using a PersistentVolume can help, but as far as I can see, you can use PersistentVolume only for the script you run, but not for file produced by the script.

Hi @crottielk!

An option could be to have your script publish the report to a remote server within the handleSummary() function.

See Custom summary.

Hope this helps!

1 Like

:wave: @crottielk Additionally, AFAIR, you should be able to store files to the persistent volume if you use volumeClaim option for the script. That volume is mounted on each runner as /test.

This question also came up before here:

1 Like