Load Testing with Locust¶
Load test web applications with Locust: users and tasks, wait times, events, HTTP requests, response validation, step load and distributed mode.
Lessons
- Why Load Testing ?
- Locust Installation
- Understanding Locust Wait Times with Complete Examples
- Simulating Multiple User Types in Locust
- Why on_start and on_stop are Essential for Locust Users
- How to use test_start and test_stop Events in Locust
- @task decorator
- task attribute
- Sequential Task Set
- HTTP Load Testing with Locust's HttpUser
- Load Testing with HTTP POST Requests in Locust
- Using catch_response in Locust for Custom Response Validation
- Iterative Load Testing with Step Size in Locust
- Enhancing Your Locust Tests with Custom Logging
- Running Locust in Distributed Mode with Master and Workers
- Why Distributed Testing?
- Locust Distributed Architecture
- Setting Up Locust in Distributed Mode
- Step 1: Prepare Your Locust Script
- Step 2: Start the Master Node
- Step 3: Start the Worker Nodes
- Step 4: Control the Test
- Key Parameters
- Scaling the Test
- Example: Running on Docker
- Monitoring Distributed Tests
- Tips for Distributed Locust