These tests run using a tool called k6, and scripts are written in ES6 JavaScript to define individual User Scenarios. You can tell k6 to run using a number of Virtual Users over a defined Duration, or you can specify stages to ramp up/down the number of Virtual Users over a period of time.
To install k6 and run the tests locally, you can run the following command:
- Windows
choco install k6 -y- Linux
sudo curl -OL https://github.com/loadimpact/k6/releases/download/v0.20.0/k6-v0.20.0-linux64.tar.gz
sudo tar -xzf k6-v0.20.0-linux64.tar.gz
sudo cp k6-v0.20.0-linux64/k6 /usr/local/binAfter this, all k6 commands are identical on Windows and Linux.
You can run k6 against your local environment by using the following command (powershell/batch or bash):
k6 run -u 10 -d 10s ./basic/root.jsThis will run k6 with 10 virtual users (-u 10) over 10 seconds (-d 10s).