Skip to content

hangocmy/k6-project

Repository files navigation

K6

1. DOCKER

Installation

  • 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.)

How to running K6 using Docker:

  • docker run --rm -i grafana/k6 run - <{SCRIPT_NAME}.js.
  • docker run --rm -i grafana/k6 run - <main.js.

How to running K6 using Win PowerShell:

  • 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 -.

2. WINDOWS

Installation

How to running K6 using CLI

  • k6 run {SCRIPT_NAME}.js.
  • k6 run main.js.

3. HOW TO RUN IDBOOKER-K6 USING DOCKER COMPOSE

3.1 All test scripts should be imported into the main.js, only run the main.js file.file.
3.2 Running k6 using Docker Compose (set up in the docker-compose.yml file):
  • 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

  • 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

About

Grafana k6 project (self study)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published