It is quite difficult for humans to execute Performance Testing manually, so it is inevitable that we depend on a performance testing tool to do the job. JMeter is used for ensuring quality deliveries in time. This article on “How to install JMeter” will provide a step-by-step guidance in the following sequence:
Introduction to JMeter
Apache JMeter is a testing tool used for analyzing and measuring the performance of different software services and products. It is a pure Java open source software used for testing Web Application or FTP application.
It is used to execute performance testing, load testing and functional testing of web applications. JMeter can also simulate a heavy load on a server by creating tons of virtual concurrent users to the web server.
How does JMeter perform Testing?
Let’s have a look at the different steps performed by JMeter during testing:
- It creates a request and sends to the server.
- It receives the response from servers, 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 so that the tester can analyze data.
Now that you know what is JMeter and how it works, let’s move on and have a look at the prerequisites for installing JMeter.
Prerequisites to install JMeter
JMeter is a pure Java desktop application. It requires a fully compliant JVM 6 or higher. You need to download and install the latest version of Java SE Development Kit.
The Operating Systems compatible with JMeter are:
- Linux
- Windows
- Mac OS
- Ubuntu
Now let’s move ahead and have a look at the steps involved in the installation process of JMeter.
JMeter Installation | Edureka
This edureka video on “How to install JMeter” will provide you with a step by step guide on how to install JMeter and the prerequisites for the working of JMeter. It also helps you understand how to create a test plan.
How to Install JMeter
The steps involved in the installation process of JMeter include:
Step 1 – Install Java
JMeter is a pure Java desktop application and it requires a fully compliant JVM 6 or higher. You can download and install the latest version of Java SE Development Kit.
You can check in the command prompt if the installation is successful. It will give you the following output :
Step 2 – Download JMeter
The Latest version of JMeter available is 5.1. You can download any of the binaries.
Step 3 – Install JMeter
Installation of JMeter is extremely easy and simple. You simply unzip the zip/tar file into the directory where you want JMeter to be installed. There is no tedious installation screen to deal with.
If you are using Windows, just run the file /bin/jmeter.bat to start JMeter in GUI mode:
Now that you have understood the installation process, you can create your own test plan in JMeter with the help of different elements.
The different components of JMeter are called Elements. Each Element is designed for a specific purpose. Some of the main elements are :
- Thread Group
- Samplers
- Listeners
- Configuration
Thread Group
Thread Groups is a collection of Threads. Each thread represents one user using the application under test. It simulates one real user request to the server. The controls for a thread group also allow you to set the number of threads for each group.
Samplers
JMeter supports testing HTTP, FTP, JDBC, and many more protocols. Thread Groups simulate user request to the server. Samplers help the Thread Group to know which type of requests (HTTP, FTP, etc.) it needs to make.
- FTP request: You can use an FTP request sampler in JMeter to do a performance test on FTP server. This controller lets you send an FTP “download file” or “upload file” request to an FTP server.
- HTTP request: This sampler lets you send an HTTP/HTTPS request to a web server.
- JDBC request: This sampler lets you execute Database Performance Testing. It sends a JDBC Request to a database.
- BSF Sampler: This sampler allows you to write a sampler using a BSF scripting language.
- Access Log Sampler: This sampler allows you to read access logs and generate HTTP requests.
- SMTP Sampler: This sampler is used to send email messages using the SMTP protocol.
Listeners
Listeners show the results of the test execution. They can show results in a different format such as a tree, table, graph or log file.
- Graph result listeners display the server response times on a Graph
- View Result Tree show results of the user request in basic HTML format
- Table Result show summary of a test result in table format
- Log shows the summary a test results in the text file
Configuration Elements
Configuration Elements are used to set up defaults and variables for later use by samplers.
- CSV Data Set Config : TheCSV Data Set Config allows you to read different parameters from text file. It is used to read lines from a file, and split them into variables.
- HTTP Cookie Manager : HTTP Cookie Manager has the same feature as a web browser. If you have an HTTP Request and the response contains a cookie, the Cookie Manager automatically stores that cookie to use it for all future requests.
- HTTP request default : This element lets you set default values that your HTTP Request controllers use.
- Login Config Element : The Login Config Element lets you add or override username and password settings in samplers.
Now with this, we have come to the end of our “How to Install JMeter” article. You are all set to create your own test plan for performance testing.
Now that you know how to install JMeter, check out the Performance Testing Using JMeter Certification Course by Edureka, a trusted online learning company with a network of more than 250,000 satisfied learners spread across the globe. This course provides you insights into software behavior during workload. In this course, you will learn how to check the response time and latency of software and test if a software package is efficient for scaling. The course will help you check the strength and analyze the overall performance of an application under different load types.
Got a question for us? Please mention it in the comments section of “How to install JMeter” and we will get back to you.