A simple example project to help in getting started with k6. Please refer to the k6 documentation for more information.
Build the mock API using the following command:
docker-compose build api
Run the mock API with Docker Compose with the following:
docker-compose up -d api
Then run the test with the following command:
docker-compose run --rm k6 run -e BASE_URL=http://api:3000 test/load/api.test.js
npm install
Start the mock API with the following:
npm start
Then in a different terminal window, use the following to run the load test:
k6 run test/load/api.test.js