top of page

Improve Quality of An Application by Performance Testing Using Apache JMeter

In this performance testing blog, we will discuss performance testing, common problems that occur due to poor performance, different tools available for performance testing, and how we can perform performance testing by using Apache JMeter.

An image of Apache JMeter or an image related to performance testing

What is Performance Testing?

Performance testing is a type of non-functional software testing that focuses on measuring the speed, scalability, stability, and responsiveness of an application under given workload conditions. The main objective of performance testing is to identify performance bottlenecks and issues that might impact the performance of the application in real-world scenarios. Performance testing helps to identify issues in the software application in the development stage.

There are several types of performance testing such as load testing, stress testing, volume testing, scalability testing, endurance testing, and spike testing.


In performance testing, we measure the application's response time, throughput, resource utilization, and scalability by simulating various loads, system loads, and network loads. In simple words, Performance testing is a process of checking how well a system or application works under different conditions, such as a heavy workload or high traffic.

What are some common problems that occur due to poor performance?

Poor performance testing of software applications can lead to several problems. Here are some common problems that can occur due to poor performance:

  • Slow response time

  • Inaccurate performance metrics

  • Downtime

  • Security vulnerabilities

  • Increased errors

  • User dissatisfaction

Different tools available for performance testing

There are various tools available for performance testing. Here are some commonly used 10 tools for performance testing:

  1. Apache JMeter: A popular open-source tool for load testing, performance testing, and functional testing.

  2. LoadRunner: A commercial tool for load testing and performance testing.

  3. Gatling: An open-source tool for load testing and performance testing.

  4. NeoLoad: A commercial tool for load testing and performance testing.

  5. BlazeMeter: A cloud-based tool for load testing and performance testing.

  6. HP Performance Center: A commercial tool for load testing and performance testing.

  7. Locust: An open-source tool for load testing and performance testing.

  8. Artillery: An open-source tool for load testing and performance testing.

  9. Tsung: An open-source tool for load testing and performance testing.

  10. LoadUI: A free and open-source tool for load testing and performance testing.

How to perform Performance Testing by using Apache JMeter?

Here are the basic steps for performing performance testing using Apache JMeter:


Download and install Apache JMeter

  • To run Apache JMeter, you should have java installed on your local system. Use the command as java -version

  • Go to the Apache JMeter website to download Apache JMeter https://jmeter.apache.org/download_jmeter.cgi

  • Go to the Binaries section and click on the JMeter zip file

  • JMeter zip will be downloaded and then unzip the folder

  • Go to the bin directory and run jmeter.bat

Create a new Test Plan

  • Launch jmeter.bat

  • Click on the file and then click on new.

  • A new test plan will be added.

Create Test Plan

Add a Thread Group

  • The Thread Group represents a group of virtual users that will be executing the test.

  • Right-click on the Test Plan

  • Click on Add -> Threads (Users) -> Thread Group

Add Thread Group

Set Thread Properties

  • The number of threads: The number of threads is nothing but the number of users which will be connecting to a given URL server application.

  • Ramp-up period: The ramp-up period is nothing but the time taken by JMeter to start all the users which are defined in the test plan.

Thread Group Properties

Add a Sampler

  • Right-click on Thread Group.

  • Click on Add -> Click on Sampler -> Select the required sampler from the list.

Add Sampler

Set Sampler Request Configuration

  • Set Protocol: The default protocol is HTTP; we can specify other protocols also like HTTPS.

  • Provide Server Name or IP: Enter server name like reqres.in, We can also enter IP Address.

  • Enter Port Number: Enter a port like 8080

  • Specify Method and Path Parameter: Select the request method and enter the path parameter. There are different request methods like GET, POST, PUT, etc.

HTTP Sampler Request

Add Listeners

  • Listeners are used to viewing the response time, request status, throughput, and other metrics.

  • To add a listener, Right click on Thread Group

  • Click on Add and then click on the listener and select the required listener from the list.

Add Listener
View Result Tree Listener

Save Test Plan

  • Click on the file and then click on save.

  • Select the directory to save the test plan and click on Save.

Save Test Plan

Run Test Plan

  • Click on Run and then click on Start.

  • Or click on the Green Play Icon to run the test plan.

Run Test Plan

Analyze the Test Results

  • Analyze test results to identify any performance issues.

  • Go to added listener and verify the test result.

Analyze Test Result

By following the above steps, we can perform performance testing by using Apache JMeter. There are many more performance testing tools available, so I will discuss a few more in my next article.

 

Our team at Vikasietum specializes in performance testing to identify performance bottlenecks and improve the speed, scalability, stability, and responsiveness of applications. Get in touch with experts today to improve the usability and performance of your system.

bottom of page