I’m currently running a very basic K6 test script, and I’m able to see the response body if I use console.log().
However, it’s a very extensive load test I’m preparing and I need to save all the responses I get to a file, for future analysis.
I’ve currently tried the solutions mentioned in the following posts:
docker-compose run k6 run --logformat raw tests.js --console-output=./test.csv it only works on windows but not Ubuntu(Unix/linux) system.
docker-compose run -u "$(id -u):$(id -g)" k6 run --logformat raw --console-output=/scripts/test.csv /scripts/stages.js gives test.csv permission denied
I’ve also tried
k6 run test.js 2>responses.csv and different file names, the output file turns out to be empty at the moment. I was logging the response as console.log() and alternatively as console.debug()
docker-compose run k6 run --logformat raw --http-debug=full tests.js 2>test.csv
Also returned an empty file.
Is there any way to be able to save the raw responses we get from a request.
Would also be helpful if we can save responses to influxdb
Trying to run this on Ubuntu