Skip to content

savvagen/k6-demo-project

Repository files navigation

K6 Testing demo

Build Status

Run Load Test inf Docker container

### Setup Monitoring and Application
docker-compose up -d --build

### Run Load Test
docker run --net=host -e "K6_OUT=influxdb=http://127.0.0.1:8086/k6" -i loadimpact/k6 run - <test/load.test.js

Exposing local influxdb port to internet

Or use this libs to expose your local services to internet using secure channel:

  1. npm install -g localtunnel
  2. lt --port 8081 --subdomain "your desired domain name"

Run with env. variables:

k6 run test/load.test.js -e BASE_URL=http://localhost:3001

### After setting the BASE_URL env., it will be accesible in the code as: __ENV.BASE_URL
#### Example: "const BASE_URL = __ENV.BASE_URL"

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published