JMeter Tutorial 2: Introduction to Apache JMeter

Introduction to Apache JMeter.

1) What is Apache JMeter?
2) Advantages and Disadvantages of JMeter
3) JMeter vs LoadRunner
4) How does JMeter Work?
5) Installation of JMeter

1) What is Apache JMeter?

> Apache JMeter is an open source, 100% Java based application with a graphical user interface. It is designed to analyse and measure the performance and load functional behavior of web application and variety of services.

> JMeter is mainly used for testing Web application but currently, it is applicable for JDBC database connections, Web services, generic TCP connections and OS native processes.

> You can perform various testing activities like Performance, Load, Stress, Regression and Functional testing, in order to get accurate performance metrics against your web server.

> JMeter is not a browser and it doesn’t render html pages like any browser does, rather it works on protocol level.

> Functional Testing with JMeter
JMeter was originally built to provide an open source solution for performance testing. However, JMeter can also be used to perform functionality tests on an application’s backend. For example: with JMeter, you can test part of your user registration functionality by testing your system’s APIs and verifying that users are successfully created within your database.

2) Advantages and Disadvantages of JMeter

Advantages of using JMeter

i) Open Source: JMeter is an open source software, 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.

ii) 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.

iii) 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.

iv) 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.

v) Flexibility: You can customize JMeter as per your requirement, you can save the effort of executing test cases manually.

vi) 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.

Disadvantages of using JMeter

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

ii) 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.

iii) 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.

3) JMeter vs LoadRunner

> JMeter and LoadRunner are two different performance testing tools.

Apache JMeter: 

1) Open Source Software

2) Limed number of protocol support

3) Limited Technical support

4) JMeter is technically less proficient.

5) JMeter has an unlimited load generation capacity.

Micro Focus LoadRunner:

1) LoadRunner is a Commercial tool

2) It supports more number of protocols

3) Since It is a Commerecial Tool it has rich Technical Support

4) LoadRunner is highly developed and complex.

5) LoadRunner has a limited load generation capacity

4) How does JMeter Work?

> JMeter creates requests and sends them to server just like a web browser requesting a page

> It receives the response from server, collects them and visualizes those details in a chart or graph.

> It processes the response from the server.

> It generates the test result in several formats such as text, XML, JSON. Then the tester can analyze the data

5) Installation of JMeter

Steps to setup JMeter on Windows OS:

Step 1: Download & Install Java Software

> JMeter is pure Java desktop application, it requires a fully compliant JVM. You can download and install the latest version of Java(JDK)

Step 2: Set JAVA_HOME Environment Variable

> The JAVA_HOME environment variable points to the directory where the Java run-time environment (JRE) is installed on your computer.

Step 3: Verify Java Installation

> After Java installation, you can use the following procedure to check whether Java JDK is installed successfully in your system

In Window/Linux, go to Terminal
Enter command java -version

Step 4: Download Jmeter and unzip

> Installation of JMeter is easy and simple. You simply unzip the zip/tar file into the directory where you want JMeter to be installed.

Step 5: Launch JMeter

We can start JMeter in three  modes

i) GUI Mode
ii) Server Mode
iii) Command Line Mode

Step 6: Start JMeter in GUI Mode

> On Windows, just run the file /bin/jmeter.bat to start JMeter in GUI mode.

Apache JMeter Step by Step Tutorial

JMeter Installation process, Download & Install Java, Set JAVA_HOME Environment variable, Download and extract JMeter Software and Launch JMeter on Windows operating environment using JMeter batch file in JMeter Folder. Introduction to Apache JMeter Tool, Performance Test Tools, LoadRunner vs. JMeter, Installation of JMeter on Windows operating environment and Macintosh operating environment. Components of JMeter Tool, JMeter tool Window Architecture, Features of JMeter, Advantages of JMeter, Disadvantages of JMeter and Create first JMeter Test Script.

Follow me on social media: