docker pull grafana/k6
docker pull grafana/k6:master-with-browser
(We also have a separate image you can use with chromium installed to run k6 browser tests.)
docker run --rm -i grafana/k6 run - <{SCRIPT_NAME}.js
.docker run --rm -i grafana/k6 run - <main.js
.
PS C:\> cat {SCRIPT_NAME}.js | docker run --rm -i grafana/k6 run -
.PS C:\> cat main.js | docker run --rm -i grafana/k6 run -
.
- Go to: https://k6.io/docs/get-started/installation/
- Find "Windows".
- Click "the latest official installer" to install.
k6 run {SCRIPT_NAME}.js
.k6 run main.js
.
- Way 1:
docker-compose up -d influxdb grafana && docker-compose run --rm k6 run -e TEST_TYPE=${ENV_TEST_TYPE} /tests/main.js
- ENV_TEST_TYPE=
SMOKE
- ENV_TEST_TYPE=
LOAD
- ENV_TEST_TYPE=
STRESS
- ENV_TEST_TYPE=
- Way 2 - Override vus & duration:
docker-compose up -d influxdb grafana && docker-compose run --rm k6 run -e TEST_TYPE=${ENV_TEST_TYPE} --duration {DURATION} --vus {USER_NUMBER} /tests/main.jss
- DURATION=
10s
- USER_NUMBER=
10
- DURATION=