HomeBlogLoad Testing: JMeter vs Locust

Load Testing: JMeter vs Locust




Apache JMeter and Locust are two of the most well-known and popular load testing tools used by testers and developers in many IT (or maybe non-IT) companies. Since I got some years of experiences with JMeter as well as a couple of months with Locust I decided to compare them based on some particular criteria. However, I am not trying to announce a winner here but in the end, you may guess I love which one of these two!

What is load testing anyways?
The main goal of load testing is to determine a system’s performance under real-life load conditions. This testing helps determine how our application behaves when lots of users at the same time.

Load testings main goal:
• The maximum operating capacity of an application
• Determine whether the current infrastructure is sufficient to run the application
• Sustainability of application with respect to peak user load Number of concurrent users that an application can support

JMeter is one of the oldest player here, with almost 20 years of experience. It is written in pure Java language. Initially, JMeter was developed to perform load testing of HTTP and FTP protocols but via time many other protocols have been added to its ‘sampler’ engine.
Locust, on the other hand, is a relatively young, written in Python. The main feature of this framework is that it allows you to write performance scripts in pure Python. Locust is highly scalable and flexible.

The licensing of a performance tool is essential to estimate the costs that are required for using the tool and other costs that would be associated with their use.
Both JMeter and Locust can be used freely without any restrictions on their usage. The licensing of JMeter is Apache License 2.0 and Locust has a MID license.

Pros of JMeter:
Ease of Use: Easy to install, just download, install and run. It comes preinstalled with default settings and does not require the user to have specific skills or knowledge to use
Compatibility: Having been developed in Java language it is compatible with all OS systems such as Windows, Mac, Linux
Vigorous Reporting: It generates comprehensive reports, making use of tools such as graphs, charts, tree view. In addition it supports different formats such as text, XML,HTML,and JSON
Definitive Testing: With JMeter, the user can do any kind of testing they want. Load Test, Stress Test, Practical Test, and dissemination Test, all in one tool.
Flexibility: The user can customize and modify JMeter to suit requirements and apply the automation to JMeter
Multi-practice Support: JMeter supports several protocols like HTTP, FTP, SOAP, JDBC, JMS, and LDAP. In addition, it can be used for verifying and testing the capabilities of the users’ database.

Cons of JMeter:
Memory consumption:  JMeter can be used for heavy loads, this results in a very high consumption of memory and may lead to voluminous storage usage. Thus the users may be subjected to purchase further storage space
Web use only:  JMeter is a good tool for testing and working online but it is not a suitable tool for testing offline application.
Inefficient support for JavaScript: JMeter isn’t a browser, therefore it cannot run JavaScript in the web application. It has limited prop up for processing JavaScript or Ajax, this may affect the meticulousness of model.

Pros of locust:

Easy to use: When you know python, it’s really easy to use locust
Fast: Fast to develop and run
Hackable: Get and modify official and non-official code based on your need
Test Anything: even test functionality of the system in case when you need to
Supports distributed: Define a master and as many as you want workers (slaves) for that.

Cons of Locust:
Not easy to use: well, for non-python users
Limited: can just test HTTP requests
Lack of rich documentation: as a young open-source project the community is on growing. The official documentation is not really useful sometimes.







Please enter your comment!
Please enter your name here

Mehdi Shokoohi

Software Quality Engineer

Recent posts

Recent comments