JMeter actually runs tests without compiling anything, which is pretty wild for a performance testing tool.

Let’s get JMeter installed and run a basic test.

First, you need Java. JMeter is a Java application, so it requires a Java Development Kit (JDK) or Java Runtime Environment (JRE) version 8 or higher. You can download it from Oracle or use an open-source distribution like Adoptium.

To check if you have Java installed and its version, open your terminal or command prompt and run:

java -version

If you get an error like "java: command not found," you’ll need to install Java and ensure its bin directory is added to your system’s PATH environment variable.

Next, download the latest stable JMeter binary from the official Apache JMeter website. Look for the .zip or .tar.gz file.

Once downloaded, extract the archive to a directory of your choice. For example, on Linux or macOS, you might extract it to /opt/jmeter:

tar -xzf apache-jmeter-5.5.tgz -C /opt/

On Windows, you’d simply extract the .zip file to a folder like C:\jmeter.

Navigate into the extracted JMeter directory. Inside, you’ll find a bin folder. This is where the executable scripts reside.

To launch JMeter’s GUI, run the appropriate script for your operating system.

On Windows, double-click jmeter.bat or run from the command line:

C:\jmeter\bin\jmeter.bat

On Linux/macOS, run:

/opt/jmeter/bin/jmeter.sh

This will open the JMeter GUI. It might take a few moments to load, especially on the first run.

Now, let’s create a very simple test. In the JMeter GUI, right-click on the "Test Plan" in the left-hand tree. Go to "Add" -> "Threads (Users)" -> "Thread Group."

A "Thread Group" is where you define how many users will hit your target and for how long. For our first test, let’s set:

  • Number of Threads (users): 1
  • Ramp-up Period (seconds): 1
  • Loop Count: 1

This means one user will execute the test once, with a minimal delay.

Next, right-click on the "Thread Group" you just created. Go to "Add" -> "Sampler" -> "HTTP Request."

This sampler will make an actual HTTP request. In the "HTTP Request" configuration panel:

  • Protocol: https
  • Server Name or IP: www.google.com
  • Method: GET
  • Path: (leave blank for the root path)

This configuration will send a GET request to https://www.google.com.

To see the results, we need a listener. Right-click on the "Thread Group" again. Go to "Add" -> "Listener" -> "View Results Tree."

The "View Results Tree" listener shows every request and response. It’s invaluable for debugging.

Save your test plan. Go to "File" -> "Save Test Plan as…" and save it as first_test.jmx in your JMeter directory.

To run the test, click the green "Start" button (the play icon) in the toolbar.

You’ll see the "View Results Tree" populate. If successful, you’ll see a single entry with a green status indicator. Click on it to see the request sent and the response received from Google.

If you get an error, it’s usually because of a network issue, a typo in the server name, or a firewall blocking the connection.

The next step is often to add more sophisticated samplers, like HTTP Cookie Manager to handle sessions, or a CSV Data Set Config to feed in variables.

Want structured learning?

Take the full Jmeter course →