top of page
Writer's picturemizba shaik

Performance Testing-JMeter (Part-1)

Performance Testing is a Non-Functional Testing method . In this test we will verify the  speed, scalability and stability of of the software under a particular workload. The main purpose of performance testing is to identify and eliminate the performance bottlenecks in the software application. It is a subset of performance engineering and is also known as “Perf Testing”

  • Speed – Determines whether the application responds quickly.

  • Scalability – Determines the maximum user load the software application can handle.

  • Stability – Determines if the application is stable under varying loads.


Types of Performance Testing

There are 5 types of performance testing:

1.     Load Test:  In this we will verify the performance of the software with customer expected load.

Ex: In a web application client requirement is to prepare a software with 1000 users to be logged in at a time. So to complete this test as a test engineer we have to use 1000 logins to verify the connectivity.

2.     Stress Test: In this test we will apply more than customer expected load to verify the capacity of the software.

Ex: In the previous application test with more than 1000 logins.

3.     Spike Test: In this test we will apply more (huge) amount of load to find the server crash point.

Ex: In the previous application login with 4000/5000 users to check the server crash point.

4.     Endurance Test: In this test we will verify memory leakages in the long run.

Ex: In the above application login with customer expected load , that is 1000 users but keep on login for more time to see whether there are any session disconnect.

5.      Volume Test: In this test  large no. of. Data is populated in a database, and the overall software system’s behavior is monitored. The objective is to check software application’s performance under varying database volumes.


Performance Problems

Most performance problems revolve around speed, response time, load time, and poor scalability. Speed is often one of the most important attributes of an application. A slow-running application will lose potential users. Performance testing ensures an app runs fast enough to keep a user’s attention and interest.

  • Long Load time – Load time is normally the initial time it takes an application to start. This should generally be kept to a minimum. While some applications are impossible to make load in under a minute, Load time should be kept under a few seconds if possible.

  • Poor response time – Response time is the time it takes from when a user inputs data into the application until the application outputs a response to that input. Generally, this should be very quick.

  • Poor scalability – A software product suffers from poor scalability when it cannot handle the expected number of users or when it does not accommodate a wide enough range of users. Load Testing should be done to be certain the application can handle the anticipated number of users.

  • Bottlenecking – Bottlenecks are obstructions in a system that degrade overall system performance. Bottlenecking is when either coding errors or hardware issues cause a decrease in throughput under certain loads. Bottlenecking is often caused by one faulty section of code. The key to fixing a bottlenecking issue is finding the section of code causing the slow down and trying to fix it there. Bottlenecking is generally fixed by either fixing poor running processes or adding additional Hardware. Some common performance bottlenecks are

  • CPU utilization

  • Memory utilization

  • Network utilization

  • Operating System limitations

  • Disk usage


Performance Testing Process

The methodology adopted for performance testing can vary widely, but the objective for performance tests remains the same. It can help demonstrate that your software system meets certain pre-defined performance criteria.


 


  •  Identify Your Testing Environment

Know your physical test environment, production environment and what testing tools are available. Understand details of the hardware, software and network configurations used during testing before you begin the testing process. It will help testers create more efficient tests. It will also help identify possible challenges that testers may encounter during the performance testing procedures.

  •  Identify the Performance Acceptance Criteria

Establish the goals and numbers that will indicate the success of performance tests. The easiest way to do this is to refer to project specifications and expectations from the software. Accordingly, testers can determine test metrics, benchmarks, and thresholds to define acceptable system performance.

  • Plan & Design Performance Tests

Determine how usage is likely to vary amongst end users and identify key scenarios to test for all possible use cases. It is necessary to simulate a variety of end users, plan performance test data and outline what metrics will be gathered.

  • Configuring the Test Environment

Prepare the testing environment before execution. Also, arrange tools and other resources.

  • Implement Test Design

Create the performance tests according to your test design.

  • Execute Tests

Execute and monitor the tests.

  • Analyze and Report

Consolidate, analyze and share test results. Then fine tune and test again to see if there is an improvement or decrease in performance. Since improvements generally grow smaller with each retest, stop when bottlenecking is caused by the CPU. Then you may have the consider option of increasing CPU power.


Metrics for Performance Testing

Performance Testing Metric is something that is required to understand the quality and productivity of performance testing. 

Several performance testing metrics are used; some of them are:

  • Processor Usage: Time spent by the processor to execute non-idle threads.

  • Memory use: The available physical memory to process on a system.

  • Disk time: It is the time taken by the disk to read or write a request.

  • Bandwidth: Bits per second used by a network interface.

  • Private bytes: A specific number of bytes allocated to a particular process.

  • Committed memory: The amount of virtual memory used.

  • Response time: Time between the user’s request and the first response character. 

  • Throughput: Rate of requests received per second by a network.

  • Hit ratios: Number of SQL statements that are handled by cached data.

  • Top waits: Monitoring of the wait times that could be cut.

  • CPU interrupts per second: Average number of interruptions that a processor receives and processes each second.

  • Maximum active sessions: Maximum number of sessions that may stay active at once.

  • Thread counts: Determining the well-being of the application by checking the number of running and active threads.

  • Disk queue length: Average number of read and write requests that are queued for a sample interview. 

  • Garbage collection: Returning the memory to the unused system, which helps in monitoring the efficiency. 


Tools for Performance Testing

There are a wide variety of performance testing tools available in the market. The tool you choose for testing will depend on many factors such as types of the protocol supported, license cost, hardware requirements, platform support etc. Below is a list of popularly used testing tools.


 

 

 

 

Here, we shall see the most outstanding tool out of these, i.e., the JMeter, and understand what makes JMeter a perfect fit for Performance Testing.


JMeter

The Apache JMeter is an open-source, purely Java-based software. The software is used to perform performance testing, functional testing, and load testing of web applications. 

It is used to test load testing functional behavior and measuring performance. JMeter makes it possible by creating a huge number of concurrent users that simulate a heavy load. Initially, JMeter was developed to test applications but now has expanded to other test functions. 


Why JMeter?

To understand why JMeter is the most popular Performance testing tool, let’s have a look at these six reasons:

1. Free of Cost-JMeter is free of cost, has a friendly interface, and allows users to automate their work.

2. Performance Testing of Applications-JMeter helps in the performance testing of both static and dynamic resources. Static resources like HTML and JavaScript, and dynamic resources such as JSP, Servlets, and AJAX.

3. Load Testing and Stress Testing-Performance testing in JMeter includes load testing and stress testing. Hence, it identifies the maximum concurrent users that the server can handle.

4. Framework-The framework in JMeter allows multi-threading, which means several separate thread groups may perform simultaneous and concurrent sampling.

5. Graphical Analysis-JMeter enables the performance testing representation in a graphical format like the graph, tree, table, report, etc., making the analysis representable and interesting.

6. Platform Independent-Since JMeter is entirely Java-based, it can be used across any platform or server to run a Java Virtual Machine. 

 

For next parts refer below links

 


 


 

 


 


 


 

 

 

 


 

 


 

 

 

 

 

55 views

Recent Posts

See All
bottom of page