Is it possible to autogenerate the HTML report at the end of the run?

Hey everyone,
I’ve been testing out k6, and it seems like a really solid tool for load and stress testing. As part of my bachelor thesis, I’ve written a few tests and run them using the k6 Docker container with -e K6_WEB_DASHBOARD=true.

The live dashboard is useful, but what I actually need is the aggregated report at the end of the run. The problem is that if I accidentally close the webpage, the report is gone, and I have to rerun the tests, which isn’t ideal.

Is there a way to automatically generate and save the HTML report once the test finishes?
I’d really appreciate any suggestions! :slight_smile:

Pass this arguments in you run command. it will save the report automatically
K6_WEB_DASHBOARD_EXPORT=/home/oakartz/reports/report.html

1 Like