Load Test Examples

Our official and community locustfile test examples directory.

LoadForge uses the locust.io load testing application to generate load from its clusters. We support custom locustfiles for advanced load testing. Please consider contributing to the Git repo that drives this directory. Alternatively, use our wizard, or record your browser steps.

World

Search

Browse

Name Description
Adding Sleeps How to add custom sleep times to a test
Automatically Load Page Resources How to use LoadForge to automatically load page styles, javascript, images, etc.
Basic 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.
Custom HTTP Headers How to set custom headers with your requests
Custom Shapes How to customize the user load shape of a test
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)
Increase Performance With FastHTTP Using FastHttpUser to increase load test capacity
Index Get With Content Index page GET with several static content items included.
Kafka Load Testing How to customize LoadForge tests to test stress test Apache Kafka
Laravel REST API Example Load testing a REST based Laravel (or other) API example with auth and CRUD.
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.
Login With Basic Auth Login to your site or API using basic authentication
Login With CSRF Token Support CSRF tokens, for example with the Laravel framework.
MQTT Load Testing How to customize LoadForge tests to test stress test MQTT servers
Multiple User Logins How to create a test that logs in as different users
Post With JSON Data Send an HTTP POST request with a JSON data payload
Setting A Random User-Agent Create a list of user agents and select one at random for each client
Setting Request Timeouts How to set a maximum time for a request to come back
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
Testing Websockets With SocketIO How to use LoadForge to load test websocket / SocketIO based applications
WordPress Load Test Example Load test a WordPress based Blog or CMS with automatic crawling
XML-RPC Load Testing How to customize LoadForge tests to test XML-RPC servers

Ready to run your test?
Launch your locust test at scale.