Enroll in Selenium Training

Introduction to JMeter

Today, in the digital era, where websites and their users are increasing drastically, seamless user experience is a must-have for organizations because unnecessary delays in the response of the website or application distract the user's attention. Now we have greater expectations of the software we use than ever before. This is the number one reason why performance testing has become so important. Research suggests that just a 1 second delay in page load time results in 7% fewer conversions, 11% fewer page views, and a 16% decrease in customer satisfaction. And this translates to real dollars – if your site earns $100,000 per day, you’re losing $2.5 million every year due to this 1 second. Therefore, organizations prefer doing performance and load tests on application before launching them or after every major release.

In this tutorial we are going to learn about:

  • What is Performance Testing?
  • Importance of Performance Testing
  • What is JMeter and its History
  • Features of JMeter
  • How does JMeter works

What is performance testing?

Performance testing is a non-functional type of testing which is used to evaluate application under test(AUT) performance in terms of its responsiveness as well as the behaviour of AUT under the various workload.

An application is performant if it lets the end-user carry out a given task without undue delay or irritation. An application which is performing well always have a good response time. So, responsiveness of an application plays a very important role just like it's user interface and functionality because nowadays users are very demanding and want everything quick.

A slow website results into a bad user experience and have negative financial impact. Even delay of second, for longer period of time, may result into huge revenue loss. Thus, performance test of websites comes into picture. To performance test a website there are tools available, for example: JMeter, LoadRunner, WebLoad, LoadView and many more.

Importance of Performance Testing

  • Helps in evaluating potential bottlenecks of an AUT.
  • Slowness of an application or web service can be evaluated under heavy load.
  • We can find out how many parallel users an AUT can handle.
  • Helps in finding out impact of changes in each release in terms of performance.

Note: An application or software system which is when tested is called AUT or Application Under Test.

To learn more about performance testing, please refer our tutorials on What is Performance Testing.

What is JMeter and Its Brief History

Apache JMeter is an open-source, pure Java platform software which is designed to load test functional behavior and measure performance.

Initially, JMeter was introduced for load and performance test web applications, but later on its scope has widened and can perform load and performance test on Web Pages, Web Applications and static or dynamic resources Like Database, Rest Webservices, LDAP, Java Objects and more.

Stefano Mazzocchi of the Apache Software Foundation was the original developer of JMeter. He wrote it primarily to test the performance of Apache JServ (currently known as Apache Tomcat project which is popularly used as server). Later on, Apache community redesigned it to enhance the GUI, to add more features and functional testing capabilities.

Features of JMeter

Key features of JMeter includes:

  • License: Since JMeter is open source, it is free and easily available.
  • Graphical User Interface: Simple, user friendly and easy to learn as compared to other performance testing tools
  • Server/ Protocol Support: JMeter has ability to load and performance test different applications/server/protocols. A few protocols inclucdes HTTP, HTTPS, FTP, SOAP/REST, Database via JDBS, LDAP, JMS, SMTP(S), POP(3) and IMAP(S), Native Commands/ Shell Scripts and TCP.
  • Platform: JMeter is pure java software. Therefore, it is platform-independent and supports all environment.
  • Simulation: Simulate multiple users by using virtual users or unique users in order to generate heavy traffic on web server or services.
  • Supports Distributed Testing: It has master slave for distributed testing where master will distribute tests among all slaves and slaves will execute scripts against your server.
  • Test Result Visualisation: Test result can b view in different formats like Graph, Table, Tree, and Report, etc.
  • Reporting: By default, JMeter provides XML and CVS Report Formats only. We can use Jmeter and ANT together to obtain HTML report as per the requirement.
  • Testing Types: Apart from just Performance, Load, Stress testing Jmeter works well for Functional, Regression and Soak/Endurance testing too.
  • Record and Playback: Record user scenario/action in Firefox Browser and play scripts
  • Framework: Multi-threading framework allows concurrent and simultaneous sampling of different functions by many or separate thread groups.
  • Installation: No Complex installation required – Just run JMeter.bat on windows / run Jmeter.sh on Linux
  • Knowledge: Jmeter does not require extensive programming knowledge. Only prior knowledge Java language is preferred.

How JMeter Works

JMeter simulates a number of users sending request to the Application Under Test.  As soon as JMeter simulates requests, server responds and Jmeter starts collecting data. Jmeter saves all the responses and based on the server response it return statistics. These statistics shows performance of the AUT in the form of various formats as per the requirements.

Thus, with the help of JMeter we can simulate load on server, network or objects which are coming from different machines to implement real world scenario.

JMeter Workflow

When we start load or perform test of an application, JMeter creates requests to target server and simulates number of users sending requests to the target server. As soon as server starts responding to the requests, JMeter starts saving all the responses. On the basis of data/response JMeter gathers data to calculate statistical information. Finally, using this statistical information JMeter prepares a report which tells about performance of the AUT.

JMeter WorkFlow Introduction to JMeter

So, this was a brief about what is JMeter and how is it useful for us. In the upcoming section we will be installing this open source, user friendly software and slowly we will try to get hands on this performance testing tool.

JMeter Tutorial
JMeter Tutorial
Previous Article
How to Install Java on Mac OS?
How to Install Java on Mac OS?
Next Article
Lakshay Sharma
I’M LAKSHAY SHARMA AND I’M A FULL-STACK TEST AUTOMATION ENGINEER. Have passed 16 years playing with automation in mammoth projects like O2 (UK), Sprint (US), TD Bank (CA), Canadian Tire (CA), NHS (UK) & ASOS(UK). Currently, I am working with RABO Bank as a Chapter Lead QA. I am passionate about designing Automation Frameworks that follow OOPS concepts and Design patterns.
Virender Singh's Photo
Virender Singh

Similar Articles