Skip to content

JMeter CSV Data Set Config & Parameterization

Master data-driven testing in JMeter: CSV Data Set Config sharing modes (All threads vs Current thread group), EOF rules, and distributed CSV testing.

Difficulty
beginner
Guide type
how-to
Estimated read time
12 min read
Last verified version
Verified JMeter 5.6

JMeter CSV Data Set Config & Parameterization

Section titled “JMeter CSV Data Set Config & Parameterization”

Data-driven testing ensures that virtual users execute requests using realistic, varied inputs (usernames, passwords, product IDs, search queries, payment tokens) rather than repeating identical static payloads.

The CSV Data Set Config element is Apache JMeter’s primary component for feeding external CSV data into test plans. This guide explains configuration parameters, Sharing Modes, End-of-File (EOF) behaviors, and best practices for distributed load testing.


ParameterRecommended SettingDescription
Filenameusers.csv or ./data/users.csvPath to CSV file. Relative paths resolve from JMeter launch directory.
File encodingUTF-8Encoding format. Avoid leaving blank if files contain international characters.
Variable Namesusername,password,userRoleComma-separated variable names. If left blank, first row of CSV is read as headers.
Ignore first lineTrue (if CSV has header row)Prevents the header text row from being processed as actual test data.
Delimiter, (or \t for tab-separated)Character separating values in each row.
Allow quoted data?TrueAllows values containing commas wrapped in quotes ("New York, NY").
Recycle on EOF?True or FalseWhen the end of the file is reached, determines whether to loop back to top.
Stop thread on EOF?True or FalseStops the virtual user thread when the file runs out of records.
Sharing modeAll threads / Current thread groupControls how file cursors are shared across threads.

Sharing Mode defines which virtual users share the CSV file read cursor:

  • Behavior: All virtual users across all Thread Groups read from a single shared file cursor.
  • Result: Every row in the CSV file is read sequentially across the entire test. No two threads receive the same row on a given step.
  • Best for: Unique test credentials, single-use coupon codes, unique transaction IDs.
  • Behavior: Each Thread Group maintains its own independent file read cursor.
  • Result: Thread Group A and Thread Group B both start reading from row 1 of the file independently.
  • Best for: Multi-stage workflows where each group needs access to the same baseline pool of customer IDs.
  • Behavior: Every virtual user thread opens its own separate file cursor and reads from row 1.
  • Result: If you have 50 threads, each thread reads line 1 on iteration 1, line 2 on iteration 2.
  • Best for: Per-thread dedicated datasets or isolated user state files.
  • Assign an arbitrary string (e.g., group_checkout). All CSV Data Set configs sharing that identifier string share the same cursor.

Recycle on EOF?Stop thread on EOF?Behavior when rows run out
TrueFalseInfinite Loop: Automatically wraps back to line 1 and continues indefinitely.
FalseTrueGraceful Shutdown: The thread stops immediately upon exhausting data.
FalseFalseDefault Value (<EOF>): Variables are assigned literal string <EOF> on subsequent reads.

4. Multi-Slave & Distributed Testing Considerations

Section titled “4. Multi-Slave & Distributed Testing Considerations”

When running JMeter in distributed master-slave mode (jmeter -r):

To ensure remote slaves do not use duplicate credentials:

  • Split users.csv into users_slave1.csv and users_slave2.csv.
  • In CSV Data Set Config, reference dynamic filename:
users_\${__P(nodeId, 1)}.csv

Use the __CSVRead function with thread and host offsets for mathematical partitioning without physical file splits.


  1. Keep Paths Relative: Always use ./data/users.csv instead of absolute Windows paths (C:\Users\...) to ensure portability across developer machines, Docker containers, and CI/CD agents.
  2. Always Set Variable Names Explicitly: Defining username,password in the element rather than relying on header rows avoids subtle bugs if CSV header formatting changes.
  3. Use Memory Buffers for Huge CSVs: For datasets with millions of rows, ensure file storage has fast SSD read latency.
On this page