This repo contains code to do load testing on the integreatly-operator.
A rhsso_auth.csv
file is required to be in the same location as the locustfile.
This file is currently create by the hyperfoil load testing function.
Log into a remote instances and insure the following tooling is installed
sudo dnf install python39 -y
pip3 install locust
mkdir locust
From the local machine copy the source files.
scp -i ~/.ssh/some_key.pem -r locust/* ec2-user@<remote.url>:locust
After an initial hyperfoil run copy the rhsso_auth.csv
file from /tmp/hyperfoil/runs/****/
.
Start locust and the max number of workers supported by the ec2 instances.
~/locust/start.sh
Navigate to the locust UI via http://<remote.url>:8089. Here you can start the load testing.
After the test have run and test results downloaded, locust can be stopped using ~/locust/kill.sh
Set up the local environment using poetry.
poetry install
If you are wishing not to use the mock server you can set up the environment using.
poetry install --no-dev
As the rhsso_auth.csv
file is required there is a sample file that will work with the mock server.
cp locust/sample.rhsso_auth.csv locust/rhsso_auth.csv
Active the mock server if needed.
poetry run uvicorn --reload mock_server.main:app
Start an instance of locust.
cd locust
poetry run locust