I'm trying to run some tests using k6 on my project running on docker.
I added this to my docker-compose.yml :
k6:
image: loadimpact/k6:latest
command: run /test.js
volumes:
- ./tests/test.js:/test.js
It runs my test when I start the project with docker-compose up
.
But then the k6 container stops, I want to keep it running so I can do something like docker exec -it k6_container run test2.js
How to achieve this ? Is there a cleaner way to run tests ?
I managed to run the tests but I had to install k6 on my PC, since I'm working with a team I want to add it to the dockerized project.
Thank you