Locust Directory

Our community contributed locustfile examples directory.


Community locustfiles

LoadForge uses the load testing application to generate load from it's clusters. We support custom locustfiles for advanced load testing, and, have a community driven directory of examples for you to use.

Please consider contributing to the Git repo that drives this directory.

To use these you can copy the code section into your "locustfile" setting when creating or editing a Test.

For more help on Tests please see our official documentation. Logged in users can also use our wizard to generate a locustfile.


Name Description
API Load Test Example Load test a REST based HTTP API with Bearer token authentication
Checking Response Text And Time Check for a specific word in the result, and that it doesn't take over 0.5 seconds.
Checking Status Codes Test that checks for a 404 response or considers it a failure.
Crawling Real HTTP User Index a site and crawl all the pages with a random delay as a real user would.
Disable SSL Verification Examples of how to prevent SSL verification on your tests.
Getting Auth Token Send a login request to get an authorization token for the rest of your test
GraphQL Load Test Example Load test a GraphQL based API (SpaceX in this example)
Index Get With Content Index page GET with several static content items included.
Login And Crawl All Pages Login to a site and crawl all the pages on the index page.
Login And Get Profile Test that logs in and then requests a profile page.
Login At Start Test that logs in for each simulated user before testing.
Nested TaskSets Example for using nested TaskSets in your test configuration.
Simple Index Get Index page with a simple HTTP GET and a simulated user wait time between pages.
Testing Webserver Vs Web App Generating load on the webserver as opposed to the web application
Testing Websockets How to use LoadForge to load test websockets based applications