What is JMeter? Why use JMeter? Advantages and disadvantages

Let us assume that your company has just developed an e-commerce website that is similar to Amazon. This is the biggest project for your organization and a large number of customers are expected to use this website. It needs to be able to handle 100,000 transactions in one day and thousands of concurrent users or more.



Some things that you may be concerned about when developing the website are:
  • What will happen to the web server(s) in such severe load conditions? 
  • How can you test your website in this scenario? 
  • Getting 100,000 concurrent users to connect to your website for testing is not feasible.
Fortunately, there is a software which can help you to deal with these issues. It is JMeter. This is the best tool to measure a website’s performance. Originally, the developers developed this tool for performance testing of web applications but in fact, it can do much more than that.

This tutorial will provide you complete information about JMeter.


What is JMeter?



JMeter is an software that can be used to execute performance testing, load testing and functional testing of your web applications. JMeter can also simulate a heavy load on a server by creating tons of virtual concurrent users to web server.


JMeter is an open source application. This means that you can download JMeter’s source code to analyze and modify it if you want.


Stefano Mazzocchi of the Apache Software Foundation first designed it. He is now a software engineer at Google. Nowadays, JMeter has become one of the most popular testing tools in the world, beside Selenium and Load Runner.

Advantages and Disadvantages of using JMeter


Now that you understand what JMeter is, let us look at some of the advantages and disadvantages of using JMeter. There are tons of testing tools out there such as Load Runner, Selenium, and QTP. Why do you need JMeter to do the performance testing? This is because JMeter has features that other tools do not have.

Advantages of using JMeter




Open Source: JMeter is an open source software. This means that it can be downloaded free of cost. It is also a 100% pure Java application. The developer can use its source code, can modify and customize it as per their requirement. They can also contribute their code to make a better JMeter. 

Ease of Use: The user can install and use JMeter easily. Just download it from internet, install and run. As a pure Java desktop application, it comes ready to use with default settings. It does not require you to have any specific skills or domain knowledge to use it. 

Platform independent: JMeter is developed in Java, which is the most popular programming language in the world. Therefore, it can run in any OS be it Window, Linux or Mac.
 
  • Robust Reporting: JMeter can generate the effective reporting. The test result can be visualized by using Graph, Chart, and Tree View. JMeter supports different formats for reporting like text, XML, HTML and JSON. 
  • Ultimate Testing: With JMeter, user can do any kind of testing they want. Load Test, Stress Test, Functional Test, Distributed Test, all in one tool. 
  • Flexibility: You can customize JMeter as per your requirement and apply the automation testing to JMeter. You can save the effort of executing test cases manually. 
  • Multi Protocol Support: JMeter supports several protocols like HTTP, FTP, SOAP, JDBC, JMS, and LDAP. It can also be used for testing the performance of your database.
JMeter is amazing tool, but it still has some drawbacks.


Disadvantages of using JMeter

Memory Consumption: JMeter can simulate heavy load and visualize the test report. This may consume lots of memory and can lead out of memory under heavy load.

Web application only: JMeter is good tool for testing web application but it is not a suitable tool for testing desktop application.

Lack of support for JavaScript:
JMeter is not a browser, so it cannot run JavaScript in the web application. It has limited support for processing JavaScript or Ajax, this may affect the accuracy of simulation.

How does JMeter perform load testing?

The following figure shows the basic workflow of JMeter.

  1. JMeter creates requests and sends them to server just like a web browser requesting a page 
  2. It receives the response from server, collects them and visualizes those details in a chart or graph. 
  3. It processes the response from the server. 
  4. It generates the test result in several formats such as text, XML, JSON. Then the tester can analyze the data.