
Learn how to define user and task set with sequential task set in Locust, compare random versus sequential execution, apply weight attributes for tasks, and coordinate multiple task classes.
Learn how Locust uses local state controls and event hooks, including on_test_start, on_test_stop, on_start, and on_stop, to manage when tests and users begin and end.
practice the concepts of locust with attached locust files
Define asset classes and connect them to user classes to model multiple user types—registered, guest, and mobile—driving workflows like navigate categories and add to cart to simulate real-world e-commerce load.
Compare cookies for registered and guest users by printing header cookies, then store and retrieve them with the framework, illustrating the abstract class handling cookies.
Learn to implement Locust event hooks to capture and store detailed request data for every call, including response time, status, and exceptions. Export the data to files for analysis.
Install the Python InfluxDB client, run a Docker InfluxDB container, create and switch to a new database, and store event data using a template with measurements, tags, and timestamps.
Integrate Grafana with InfluxDB to visualize performance data from Locust, set up a data source, and build dashboards showing response time, response length, and failures.
Project source code attached as .zip
Explore the init event in master-slave Locust setups, learn task tagging, build a custom client with success and failure events, and run Locust as a library with csv stats.
Section-1 : you will learn the basic concept of locust and standard features.
a. Setup development environment
b. Explanation of User, TaskSet and Sequential TaskSet
c. Explanation on_test_start, on_test_stop, on_start, on_stop
d. REST execution using locust HTTPUser class
Section-2 : you will learn how to use locust to create a concrete performance test framework to perform load and stress testing on your application under test, you will also learn how to integrate with InfluxDB and Grafana for better performance data analysis.
a. Abstract HTTPUser class and usage
b. TaskSet Modules and User Integration
c. Loading Users from CSV
d. User Login & Session Management
e. Multiple User Types & Distribution
f. Registered & Guest User Cookie
g. Custom Logger & Step Load
h. Event Hooks & Request Data Store
i. Request Data Store in InfluxDB
j. Grafana & InfluxDB integration
Section-3 : you will learn different execution model of locust which include master-slave configuration as well. In section4 you will get to know few extra topics of locust which might be useful for your specific project.
a. Locust Master-Slave architecture model
b. Locust execution with config file
Section-4 : Extra topics which will help to design your own framework and clear report analysis concepts.
a. INIT Event, Tagging Tasks, Custom Client, Stats in CSV, Locust as library
b. Unique Users Distribution For Master-Worker Execution Model
c. Significance of Mean & Standard Deviation Calculation