Skip to content

JMeter

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.

How to Use JMeter While Controller

JMeter's While controller is best suited for advanced scripts which simulate realistic user behaviors. It allows to define a behavior which occurs on a certain condition. Designing realistic behaving users involves designing users whose behavior depends on the server responses, and act accordingly.

This post explores in details various JMeter While usages and explains them thoroughly.

While Controller