How to do JMeter Load Testing Tutorial 

JMeter is a Java-based open-source load testing tool used to analyze the performance of websites, applications, web services, and other dynamic resources under high traffic conditions.

What is JMeter and How it Works

Steps to Do JMeter Load Testing

load testing loadview
load testing loadview

How to do JMeter Load Testing Tutorial 

JMeter is a Java-based open-source load testing tool used to analyze the performance of websites, applications, web services, and other dynamic resources under high traffic conditions.

What is JMeter and How it Works

Steps to Do JMeter Load Testing

What is JMeter?

JMeter is a free open-source tool used for analyzing and measuring the performance of applications, different software services, and websites. Written entirely in Java, JMeter can be used to conduct performance, load, and functional testing of many different web applications and server protocols.

Apache JMeter can simulate heavy loads on a server by creating multiple virtual users, also known as concurrent users, simultaneously. JMeter can also be used to test both web and FTP applications, SOAP and REST APIs, as well as email protocols like SMTP, POP3, IMAP and much more.

Setup a Load Test
in Minutes

On-demand. No credit card. No contract.

JMeter Load Testing Steps

Data Gathering

1 – Verify System Requirements

Before using JMeter, you must ensure that a current version of Java is installed on your system. The latest version requires Java 8 or higher. It is best practice to always use the most current version of JMeter as the software is constantly being improved and updated.

Customizable

1-1 Download & Install JMeter

  1. Visit the Apache JMeter website.
  2. Select Download Releases from the left-hand side of the page, under Download.
  3. Select from JMeter Binaries or JMeter Source files and it will begin downloading.
  4. Unzip and extract the file into the location/folder on your machine once the file is downloaded.

Note: JMeter can be started in three different modes. For the purposes of this JMeter load testing tutorial, we will focus on starting in GUI mode.

  • GUI mode. GUI mode is used to build test scripts and debugging.
  • Command Line Interface (CLI) Mode. CLI mode is used for load testing.
  • Server Mode. Server mode is used for distributed load testing on remote nodes.
Scalable

1-2 Launch JMeter

  1. Navigate to the location where you saved the JMeter directory.
  2. Select the /bin folder
  3. Locate and select the jmeter.bat file
  4. Wait for the interface to begin loading (GUI mode). Once it has finished loading, we can begin creating our test plan.
Try LoadView for 30 days!

No credit card. No contract.

Application Details

2 – Create JMeter Test Plan

Once JMeter has completely loaded, you can begin the process of creating the test plan. The test plan includes all of the elements that go into building the test plan. We will talk more about these elements in the coming sections.

Customizable

2-1 Set Up JMeter Test Plan

  1. Select File from the top-left corner to create a test plan from scratch.
  2. Select New.
  3. Select the New icon from the toolbar (alternative method). A new test plan will be displayed on the screen.
  4. Configure the test plan elements.

JMeter also allows users to build test plans from templates that contain the necessary test elements. There are numerous options available depending on your JMeter load testing requirements. Listed below are just a few of the options that are available to users.

 

  • BeanShell Sampler
  • Building a SOAP WebService Test Plan
  • Building an Advanced Web Test Plan
  • Building an FTP Test Plan
  • Functional Testing Plan
  • Building Webservice Test Plan
Web Applications

2-2 Create a Thread Group (Users)

  1. Right-click on Test Plan from the Test Plan Tree View window.
  2. Select Add.
  3. Hover over the Threads (Users) option. Another window will appear to the right.
  4. Select Thread Group. The Thread Group properties will appear in the Editor window.
  5. Configure Thread Properties: Number of Threads (Users), Ramp-Up Period, and Loop Count.
  6. Add a Thread Group Name and specific test plan notes in the Comments field, if necessary.
Setup a Load Test
in Minutes

On-demand. No credit card. No contract.

Bottlenecks

3 – Configure Samplers

Samplers are the actual requests to the server. For example, HTTP samplers are used for a website, application, or API load test. Other Samplers include FTP, SMTP, Java, JDBC, and SOAP requests. To create a request Sampler, follow the steps below. For the purposes of this JMeter load testing tutorial, we will add an HTTP sampler.

Third Party Plugins

3-1 Adding a Sampler

  1. Right-click on Thread Group under your Test Plan window
  2. Hover your cursor over Add. A window will open to the right of the Add selection.
  3. Hover your cursor over Sampler. A drop-down menu will appear will all the Sampler options.
  4. Select the HTTP Request Sampler. The Editor window will be displayed.

From here, you can configure and customize your HTTP Sampler.

  • Add a name for your HTTP Request sampler in the Name field. Optionally, you can add comment for this specific to this Sampler in the Comments field.
  • Add the specific protocol (HTTP or HTTPS).
  • Enter the Server Name or IP address. If necessary, you can also enter the Port Number.
  • The default request type is set to GET, but you can also change the request type (POST, HEAD, PUT, PATCH, etc., if necessary.)
  • Lastly, if you are testing a specific URL path, add that path in the Path field.

There are also additional configuration options listed under the Advanced tab. Once you have configured the Sampler, you can select Save.

Websites

3-2 Add Listeners

  1. Right-click Thread Group.
  2. Place your cursor over Add. Hover your cursor over Add. A window will open to the right of the Add selection.
  3. Select Listener. Here you will see a list of Listeners. Listeners are what allows you to review the test results and reports. For the purposes of this tutorial, we will use the View Results Tree Listener.
  4. Select View Results Tree Listener. Note: Multiple Listeners can be added to a load test.
Versatile

4 – Run Load Test and Analyze Results

Once you have finished configuring your Thread Group, Samplers, and Listeners, the test is ready to run. There are a couple of different ways to run, or execute, a load test.
Customizable

4-1 Run JMeter Test

  1. Save your test plan by selecting File > Save from the top-left corner.
  2. Select Start from the Run menu.
  3. Click the green arrow Run icon from the toolbar. This is an alternative method to begin the test.
  4. Wait for the test to run and finish.
  5. View Results.

You will see the test results appear below in the Test Plan window, along with various metrics.

  • The Sample # represent the number of runs, or users.
  • Start Time for each Thread.
  • Thread Name for each run and user.
  • Sample Time is the time taken for each request.
  • Status. Green checkmark indicates it has passed. A red checkmark indicates a failure.
  • Additional metrics, such as Bytes, Sent Bytes, and Latency are also included.

Running Large-scale Load Tests with LoadView

As an open-source load testing tool, JMeter allows performance testers and engineers to carry out fairly basic, straightforward test scenarios. However, it has its limitations. If you are looking to generate large-scale tests, in real browsers, from multiple geo-locations, you need a more modern load testing solution that can handle these real-world scenarios. LoadView is a cloud-based performance testing solution that provides developers the functionality to test websites, APIs and web services, web applications, Postman Collections, and JMeter scripts – all from single interface. No more worrying about hardware upgrades or managing load generators. LoadView removes these time-consuming, burdensome, and costly tasks so developers and engineers can focus on testing.

Flexible. Scalable. Powerful.

All from one convenient load testing solution: LoadView