Space time benchmarking project with k6 tool
- The test code is located in src folder
- The entry points for the tests need to have "test" word in the name to distinguish them from auxiliary files.
- Make sure Kibana is running and eCommerce sample data is loaded
- Install dependencies and transpile typescript code into JS and bundle the project:
make build
- Run your test:
- using kibana.json in assets folder:
k6 run -e USE_KIBANA_JSON=1 dist/login_test.js
- by passing values directly:
k6 run -e KIBANA_USERNAME=elastic -e KIBANA_PASSWORD=changeme -e KIBANA_URL="http://localhost:5620" -e KIBANA_VERSION=8.3.0 dist/login_test.js
- using kibana.json in assets folder:
- Ensure that Vault is properly setup
- Ensure that Go 1.17 or better is installed and
GOPATH
is on your path (addexport PATH=$PATH:$(go env GOPATH)/bin
to~/.profile
or~/.zprofile
). - Run your test:
- Running all load tests:
./k6.sh
- Running only a specific test:
./k6.sh login_test
. Note that the test name must be passed without any file extension (i.e. passlogin_test
but notlogin_test.ts
).
- Running all load tests:
The file assets/kibana.json
defines the connection parameters to Kibana.