Next Practical Step
Audit your CSV Data Set Config elements: convert absolute paths to relative paths and verify that EOF settings match your test duration goals.
Master data-driven testing in JMeter: CSV Data Set Config sharing modes (All threads vs Current thread group), EOF rules, and distributed CSV testing.
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.
| Parameter | Recommended Setting | Description |
|---|---|---|
| Filename | users.csv or ./data/users.csv | Path to CSV file. Relative paths resolve from JMeter launch directory. |
| File encoding | UTF-8 | Encoding format. Avoid leaving blank if files contain international characters. |
| Variable Names | username,password,userRole | Comma-separated variable names. If left blank, first row of CSV is read as headers. |
| Ignore first line | True (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? | True | Allows values containing commas wrapped in quotes ("New York, NY"). |
| Recycle on EOF? | True or False | When the end of the file is reached, determines whether to loop back to top. |
| Stop thread on EOF? | True or False | Stops the virtual user thread when the file runs out of records. |
| Sharing mode | All threads / Current thread group | Controls how file cursors are shared across threads. |
Sharing Mode defines which virtual users share the CSV file read cursor:
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 |
|---|---|---|
| True | False | Infinite Loop: Automatically wraps back to line 1 and continues indefinitely. |
| False | True | Graceful Shutdown: The thread stops immediately upon exhausting data. |
| False | False | Default Value (<EOF>): Variables are assigned literal string <EOF> on subsequent reads. |
When running JMeter in distributed master-slave mode (jmeter -r):
To ensure remote slaves do not use duplicate credentials:
users.csv into users_slave1.csv and users_slave2.csv.users_\${__P(nodeId, 1)}.csvUse the __CSVRead function with thread and host offsets for mathematical partitioning without physical file splits.
./data/users.csv instead of absolute Windows paths (C:\Users\...) to ensure portability across developer machines, Docker containers, and CI/CD agents.username,password in the element rather than relying on header rows avoids subtle bugs if CSV header formatting changes.