I am trying to run K6 tests in azure pipeline using docker commands. K6 tests runs fine without --out option:
$ docker run -it --rm
-v :/scripts
-v :/jsonoutput
loadimpact/k6 run --out json=/jsonoutput/my_test_result.json /scripts/script.js
When I give --out option to generate output json file it gives me error as “permission denied”. All directories paths are valid.
Please guide if we need any specific permission while creating output file while running through pipeline.
Thanks for the response.
This problem has been solved by granting chmod 777 to the report file. Now it is generating report. But the generated json file is not valid. It is giving error as Data at root level is invalid. Any help on this one?
Hm, k6 output works without such error with local Docker setup for me and looking here, it sounds as an exception generated by Azure VM? Can you see a full stack for this exception in logs / console / etc? That should help to diagnose what exactly causes it.