Skip to content

cris-oddball/locust_review

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Locust Overview

A look into using Locust to validate notifications. Only for demo purposes, ideally containerize and deploy.

Documentation here

  1. Use Python 3.12 (pyenv recommended if using multiple Python versions)
  2. Install Poetry
  3. Pull down this repo
  4. Run poetry install
  5. Copy the example.env file locally to .env and add information (project would use boto3 to pull these secrets)
  6. Run the tests:
locust -f load_test_email.py -u 2 -r 1 -t 10s -H https://sandbox-api.va.gov/vanotify --headless --html test_report_xx.html --only-summary

With 1 user and 1 user spawned per second for 60 seconds, we get 266 requests With 2 users, 1 user spawned per sec for 60 seconds, we get 539 requests

arguments:

  • -f filename to run
  • -u int, number of users to spawn
  • -r float, rate per second at which to spawn users
  • -t time string, stop after specified time, run only with headless or auto-start, else runs forever
  • -H base url, here defaults to Perf
  • --headless disables the web interface

About

A review of using Locust to validate notifications

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages