Skip to content

Instantly share code, notes, and snippets.

@aamishbaloch
Created September 22, 2017 14:05
Show Gist options
  • Save aamishbaloch/a9b727176f466414f44a4143cc609c38 to your computer and use it in GitHub Desktop.
Save aamishbaloch/a9b727176f466414f44a4143cc609c38 to your computer and use it in GitHub Desktop.
Load Testing a Django Application using LocustIO

Load Testing a Django Application using LocustIO

Django framework, used for buliding web applications quickly in a clean and efficient manner. As the size of application increases, a common issue faced by all teams is performance of the application. Measuring performance and analysis the areas of improvement is key to deliver a quality product.

LocustIO, an open source tool written in python, is used for load testing of web applications. It is simple and easy to use with web UI to view the test results. It is scalable and can be distributed over multiple machines.

This article demonstrates an example to use locust for load testing of our django web application.

Before starting load testing, we have to decide the pages which we want to test. In our case, we expect users to follow the scenario where they log in, visit different pages and submit CSRF protected forms.

LocustIO helps us in emulating the users performing these tasks on our web application. Basic idea of measuring the performance is make number of request for different tasks and analysis the success and failure of those requests.

LocustIO supports python 2.x only. Currently there is no support for python 3.x.

Get more detail on this by following to the link.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment