Skip to content

JMeter

JMeter Tutorial For Beginners

You are probably looking for a tutorial to quickly learn how to use JMeter.

You have already read many other JMeter Tutorials, but the only thing which comes to your mind is... Boring.

That's great because this Huge Tutorial will teach you in a way you don't fall asleep:

  • What JMeter Is: Learn what a Load Testing Tool is,
  • How It Works: get introduced to the concepts behind the tool and know the JMeter features,
  • How to Setup the Tool: learn how to install and run JMeter,
  • How to Build a Test Plan: JMeter Test Plan is the root for all tests, learn how to create your own,
  • How to Run Your First Test: We're going to unleash JMeter's power,
  • How to design dynamically behaving users by extracting content from server responses,
  • Finally, How to Collect and Analyze Results: gathering response times and analyzing the target website performance.

I promise, at the end of this tutorial, JMeter won't have any secret for you anymore! And, it will be fun too.

Mastering JMeter Csv Data Set Config

You're probably asking several legitimate questions:

  • How can I simulate concurrent users with unique logins using JMeter ?
  • How can I split JMeter CSV Data Set over multiple load generators in case of Remote Testing?
  • Is there a solution to Randomize the content of the CSV before a test run?

Let me tell you a secret: you'll get all the answers below.

You will learn how to swarm your system with dynamically behaving users thanks to JMeter CSV Data Set Config.

Ready to make a leap forward in your JMeter skills? Let's get to the business.

JMeter response assertion

When running a protocol based load test with JMeter, it is always a challenge to make sure the server responses are correct. The default validation is only done on HTTP response codes based on their value:

OK < 400 <= KO

And since 4XX and 5XX HTTP response codes are error messages it makes sense. But it's easy to understand why this is not enough.

Multiple User Login Using JMeter

Problem

You want to simulate a realistic load test where every user is having a unique user session. You application may only accept one user login per account at a time. You want each concurrent user to pick a different login password.

It's way more realistic to simulate concurrent users using unique logins and passwords because it's closer to the real world load. It's a good practice to avoid using a single user login and password for all concurrent users. Typically, web servers create web sessions per account. Using a single account for multiple users can mess up things on server side pretty quickly.

Solution

JMeter provides a facility to manage login and password: CSV Dataset Config. By defining a CSV file containing all the login and password couples, JMeter can pick a line from the file on each user iteration and assign them into variables.

Fix JMeter SNI Issue

SNI is the acronym for Server Name Indication:

Server Name Indication (SNI) is an extension to the TLS computer networking protocol by which a client indicates which hostname it is attempting to connect to at the start of the handshaking process.

SNI extension may not work with legacy web-servers who doesn't support it. Fortunately, SNI extension can be disabled in JMeter. JMeter is a Java program. Java has enabled SNI support in Java 7. The issue is typically displayed in JMeter as an SSLHandshakeException, with message like handshake_failure or handshake alert: unrecognized_name.

JMeter uses HTTPClient to perform Http Requests. HttpClient uses the Java JDK SSL support mechanism. Therefore, disabling SNI support in the Java Virtual Machine will disable SNI in HttpClient.