This is a brief project created to perform tests using K6.
Requirements:
- AWS dev/qa account
- Docker and docker-compose installed
Inside all scripts must be stored into scripts dir
Both docker-compose files contain Influxdb and Grafana to integrate with K6 tests in real time. To check how the tests are going just access this into your local machine after running any script
The local tests contain all the images needed to run a livecomments environment.
First, run the docker-compose local entirely
docker-compose -f docker-compose.local.yaml up
Then, run k6 into another terminal
docker-compose -f docker-compose.remote.yaml run k6 run /scripts/livecomments-local.js
The remote execution allows you to run the scripts onto external endpoints such as our lower environments.
First, start the influxdb and grafana
docker-compose -f docker-compose.remote.yaml up influxdb grafana
Then, run k6 into another terminal
docker-compose -f docker-compose.remote.yaml run k6 run /scripts/livecomments.js
You also can overwrite the variables by running:
docker-compose -f docker-compose.remote.yaml run k6 run -e VARIABLE_NAME={VALUE} -e -e VARIABLE_2_NAME={VALUE} /scripts/livecomments.js
As an example these are the variables for the above script (livecomments.js):