This module provides components and systems to conduct load-testing to your endpoint. It has multiple key features:
- Configure both get and post requests
- Define reusable shapes to test your endpoints including wait time, ramp up and down.
- Leverages multi-threaded system to increase concurrency
- Live view the test result as it runs, with interactability to slice/dice.
- Store data for future analysis
Required python > v3.8
pip install -r requirements.txt
- Run the sample server for test endpoints.
python server.py
- Configure the configs for testing.
config.yaml
. Default setting is connected to local server - Run tester.
python tester.py
.
With the data/
's previous test result, after installation you are welcome to directly run the analyze_app.py and see localhost:8081 to
view the graphs to get a glance view of the outcome.
tester.py
is the entry point for running the load test andtests/
folder has all component for load testingtester.py
calls intoSchedulerThread
for each task/request_nameSchedulerThread
calls intoRequestThreadManager
to tune up/down number ofRequestThread
s to sendRequest
- Separately,
Metrics
singleton manages the threads to do logging that's published by the threads fromRequestThread
and more.
A simple server that receives http calls from the load tester for both get and post. Some APIs returns failures and some takes time to return.
The module that uses the published data to show results. There are two ways to access it:
python Analyzer.py
directly access a current snapshot of data graph. Default is the data underdata/
folderpython analyze_app.py
will open a localhost:8081 to access live graph with csvs indata/
.
You can mute some actors (class_name) by not allowing them, or you can allow all. Actors not in the allow list will be muted.