I am trying to execute my k6 tests with docker-compose and then visualise the results in grafana. I have started my containers and then tried editing the command given in the documentation:
docker-compose run -v \$PWD/samples:/scripts \k6 run /scripts/es6sample.js
but I keep receiving errors and I am struggling to understand the pattern needed for the command. I want to run the test.js file in the screenshot below: Repo format
The error I am receiving is:
ERROR: for k6_k6_run Cannot create container for service k6: invalid volume specification: '/Documents/practice_k6/k6/tests:tests:rw': invalid mount config for type "bind": invalid mount path: 'tests' mount path must be absolute
ERROR: for k6 Cannot create container for service k6: invalid volume specification: '/Documents/practice_k6/k6/tests:tests:rw': invalid mount config for type "bind": invalid mount path: 'tests' mount path must be absolute
ERROR: Encountered errors while bringing up the project.
Eoins-MacBook-Air:k6 eoincorr$