This repository contains performance test examples for web applications. The test is based on the Grafana K6 tool.
- Install the K6 tool. You can find the installation instructions here.
For example, on macOS, you can install it with the following command:
brew install k6
-
Clone this repository.
-
Create a
config.json
file based on theconfig.example.json
file and fill in the necessary information. -
Run the test with the following command:
k6 run examples/homepage_with_basic_auth.js
or with web dashboard:
k6 run examples/homepage_with_basic_auth.js --out web-dashboard
by default, the test will run with scenario defined in the config.js
file, but you can override it with the following command:
k6 run examples/homepage_with_basic_auth.js --vus 20 --duration 40s
Your test results will be executed with 20 virtual users for 40 seconds.
The test results will be displayed in the terminal or in the web dashboard.
- http_req_duration: The time it took to complete the request.
- http_req_failed: The number of failed requests.
- iterations: Total number of iterations.
This project is licensed under the MIT License - see the LICENSE file for details.