Performance Testing Using Locust 1.0
4.2 (112 ratings)
Course Ratings are calculated from individual students’ ratings and a variety of other signals, like age of rating and reliability, to ensure that they reflect course quality fairly and accurately.
688 students enrolled

Performance Testing Using Locust 1.0

Learn Python based Modern Load Testing Framework !
4.2 (112 ratings)
Course Ratings are calculated from individual students’ ratings and a variety of other signals, like age of rating and reliability, to ensure that they reflect course quality fairly and accurately.
688 students enrolled
Created by Anuradha Agarwal
Last updated 7/2020
English
English [Auto]
Current price: $69.99 Original price: $99.99 Discount: 30% off
5 hours left at this price!
30-Day Money-Back Guarantee
This course includes
  • 7.5 hours on-demand video
  • 56 downloadable resources
  • Full lifetime access
  • Access on mobile and TV
  • Certificate of Completion
Training 5 or more people?

Get your team access to 4,000+ top Udemy courses anytime, anywhere.

Try Udemy for Business
What you'll learn
  • Performance Testing with Locust
  • Set up locust environment - standalone, distributed from scratch as well as using docker
  • Feeding data, handling dynamic data in request, cookie handling ,nesting requests
  • API Testing using Locust
  • Logging & Error Handling
  • Working with events - test non-http clients, send data to InfluxDB
  • Understand Report
Course content
Expand all 59 lectures 07:17:53
+ Latest - Locust 1.0- Locust Development Environment
5 lectures 29:32
  • Install Python 3.8.3 on windows (information for mac as well)

Install Python
02:56
  1. Install Locust on windows (information for mac as well)

    https://www.qamilestone.com/post/setup-locust-on-linux-on-windows

  2. Use Idle. Run the sample script.

  3. Install Pycharm

Preview 07:07
  1. Create a project in Pycharm

  2. Install Locust in Project environment

  3. Run Sample Script

  4. View Locust web interface

Create Locust Project in Pycharm | Run Example Script
06:46
  1. Install Python 3.8.3 on Linux

    https://www.qamilestone.com/post/steps-to-setup-python-3-8-on-linux

  2. Create a virtual environment for Python 3.8.3

  3. Install latest Locust version on top of Python 3.8.3

    https://www.qamilestone.com/post/steps-to-setup-locust-on-linux

  4. Copy & run sample script


Create Locust environment on Linux
10:16
+ Latest - Locust 1.0- Working with Basic Locust Script
9 lectures 39:17

Create basic Locust Script:

Create class inheriting locust User class

add wait_time

add task using task decorator

Create basic Locust Script | User class | wait_time | @task
08:19

Inherit HTTPUser class & add  host attribute in different ways

Add host attribute | HTTPUser class
04:39

example & explanation for locust inbuilt wait functions between, constant, constant_pacing

Locust inbuilt wait_time methods
05:38

Add multiple classes to a locust script and weight attribute

Multiple user classes | weight attribute
03:59
Run options for commandline
01:31

--headless, -u,-r,-t , --logfile commandline option example

Running test in headless mode -define users, hatch rate ,time of run ,logfile
03:16
Add on_start | on_stop methods
04:47
Add test_start | test_stop methods
05:32
+ Latest - Locust 1.0- Working with Tasks
6 lectures 27:28

Example & explanation for task decorator . Define the execution ratio for tasks using weight.

Declaring tasks with decorator | Define task weight
04:10
Declaring tasks with tasks attribute | Define task weight
03:03

Create TaskSet class separately or inline with the User class and define tasks within.

Declaring Tasks inside TaskSet Class
05:15
Sequential Tasksets
05:26
Nested TaskSets
04:39
self.Interrupt
04:55
+ Latest - Locust 1.0 - Working with HTTP Requests
14 lectures 01:33:40

Create the first HTTP GET request and understand client attributes. Give a customized name to request in locust metrics.

HTTP GET request | client attribute | name request
04:35
HTTP POST request
05:18
Extract Response Data
03:35
Verify Response with catch_response
06:12

Complete flight booing flow using http post & verify response using catch_response=True

Assignment - Create Script for Complete Booking Flow
03:15
Session Management
01:51

Retrieve cookie from a response and send it in the next task.

Manage session using cookies
15:08
Assignment - Cookie Handling
01:50

Extract data using regex and pass to subsequent request

Extract Data from Response Body
08:18
Assignment - Complete Autoquote Workflow
06:35
Assignment - Complete Agent Lookup Workflow
04:21

Create Taskset subclasses to main Taskset class to get close to a real-world scenarios where websites are divided into modules.

Nested Tasks with HTTP requests
18:56

Create a script for REST API by sending JSON  data format and receiving JSON response

Testing API- Working with JSON data
12:33
Assignment - REST API Script - Complete Flow
01:13
+ Load Testing Environment - Upgraded 1.0
12 lectures 02:17:25

Run script with multiple different users in 2 ways.

Parametrize test using external module
15:43

Fetch user data from csv

Parametrize test using csv
12:26
Assignment - Parametrize Borland Nested Task Script Using CSV
02:25
Linear Vs Step Load Model
11:03
Distributed Work Load - Intro , Single Machine, expect-workers
10:35
Reading options from configuration file
07:43
Make script OS independent with os module
11:15
Logging
11:46
Exit User / Test on Failure
06:56
Locust Distributed Environment - Multiple machines
19:27
Run Locust Test using Docker
18:16
Locust with docker-compose
09:50
+ Locust Web Monitor & Report Statistics
5 lectures 26:16
Introduction
01:57
Run Test -Number of Users, Hatch Rate & Host
01:53
Understand Statistics & Charts - Min,Max, Avg.,Median,Percentile
14:32
Understand Statistics & Charts - RPS, Number of Users,Average Size
04:49
Retrieve test statistics in CSV format
03:05
+ Enhancing Locust Scripts
4 lectures 47:53
Understanding Event Hooks
14:44
Assignment- Print individual request data using event
02:37
Assignment Solution .Bonus-Send data to csv
11:37
Send data to InfluxDB using locust event & python InfluxDB client
18:55
+ Using Custom Clients -Testing systems other than HTTP
4 lectures 36:22
Introduction
11:06
Modularization along with time & event wrapper
13:41
Assignment- Create locust script for ftp protocol
05:27
Assignment-Solution-FTP Client Locust Script
06:08
Requirements
  • You can have any basic programming background
  • You really don't need to know Python for this course as we will tell you what is required but eventually you would like to learn this most popular language with so many sources around.
Description

Hello,

It's time to swarm your application by modern load testing framework - Locust!

It's easy to start & quick to understand. It simply figures out how many concurrent users an application handle. It is supported by the most popular language python which makes it highly flexible!

It offers highly scalable and distributed testing and all this comes at no cost! There is no reason why you should not learn this light & yet highly powerful tool. It could be an effective tool for both developers & testers.

Here in this course, I will take you through deeper sections of the tool and make sure that you get highly enabled to use this wonderful tool. Multiple assignments at each step will make you more confident about the concepts learned. Additionally, all the scripts walked through during lectures, and also the solution to the assignment are available in corresponding resources of the lectures.

In case of queries/issues, I would try to respond as early as possible.


Happy Learning!

Anuradha


Who this course is for:
  • Testers, developers who want to load test their application in quick & effective manner