JMeter CSV parameterization is surprisingly powerful because it allows your load tests to mimic real-world user behavior with unprecedented accuracy, far beyond simple variable substitution.

Let’s see it in action. Imagine we’re testing a login endpoint. Instead of sending the same username and password repeatedly, we want to use a list of actual credentials.

First, create a CSV file named users.csv:

username,password
user1,pass123
user2,securepwd
admin,supersecret

In your JMeter test plan, add a CSV Data Set Config element to your Thread Group.

Configure it like this:

  • File Name: users.csv
  • Variable Names (comma delimited): username,password
  • Delimiter: ,
  • Recycle on EOF?: True (This is crucial for longer tests; it means the data will loop back to the beginning when it runs out).
  • Stop thread on EOF?: False (We usually want the test to continue even if we run out of unique data).
  • Sharing mode: All threads (This makes the CSV accessible to all threads/users in the group. Other options are Current thread group and Current thread (individual)).

Now, in your HTTP Request sampler for the login, use the variables:

  • Path: /login
  • Parameters:
    • username: ${username}
    • password: ${password}

When you run this test, JMeter will read the users.csv file. The first thread will get user1 and pass123. The second thread will get user2 and securepwd. If you have more threads than rows, the threads will start reusing data from the beginning of the file because Recycle on EOF? is True. This simulates different users logging in with distinct credentials.

The core problem CSV Data Set Config solves is data variability. Without it, every virtual user executes the exact same request. This is unrealistic for most applications where users have unique identifiers, search terms, or product IDs. By feeding JMeter varying data from a CSV, you introduce the kind of diversity that reveals performance bottlenecks that only appear under heterogeneous load. It’s not just about having more data points; it’s about having different data points for each request, forcing the application to handle a wider range of internal states and data lookups.

A common point of confusion is the Sharing mode. If you set it to Current thread (individual), each thread will maintain its own independent pointer into the CSV file. This is useful if you want to ensure that each thread uses a completely unique set of data for the entire duration of its life and doesn’t interfere with other threads’ data consumption. However, for most scenarios where you want to pool credentials or test data across all users, All threads is the correct choice, ensuring that the CSV file is treated as a shared resource where threads pick the next available line in sequence.

Understanding the Recycle on EOF? and Stop thread on EOF? combination is key for test duration. If Recycle on EOF? is True and Stop thread on EOF? is False, the data will loop indefinitely. If both are False, threads will stop once they hit the end of the file, which is useful for tests that need to run for a fixed number of iterations based on the data available.

The next logical step is to explore how to manage large datasets and prevent data collisions when multiple threads are accessing the same CSV file concurrently.

Want structured learning?

Take the full Jmeter course →