Configure CSV Data Set Config in JMeter

How JMeter's CSV Data Set Config reads delimited rows into variables, which settings matter, and where encoding, quoting and file handling can change your data.

CSV Data Set Config is the standard JMeter element for feeding external, row-based test data such as usernames, IDs or search terms into a test plan. It reads a delimited text file line by line and exposes each column as a JMeter variable that samplers can reference. This review covers what the element changes in your data, which settings decide whether the values arrive intact, and when a different approach is the better choice. It draws on the element's documented behavior. No version-specific test results or measurements were supplied, so details that vary by JMeter release are marked as things to verify.

Is it suitable for your intended use?

CSV Data Set Config is a good fit when each thread or iteration needs a different row of input and that input fits in a simple, consistently delimited file. Its main benefit is that it handles test data without scripting. You point it at a file, name the columns, and reference them as ${variableName} in requests.

The main tradeoff is that it reads the file sequentially and shares one read position according to the sharing mode you choose. That makes row-to-thread assignment predictable only when the sharing mode, thread count and end-of-file settings are deliberately chosen. If you need random rows, rows chosen by key, or data that changes during the test, consider a scripted element or one of JMeter's file-reading functions.

For a single fixed value, or a handful of constants, skip the file entirely. User Defined Variables or a plain value in the sampler is simpler and has fewer ways to fail.

What the element actually changes

The "transformation" here is parsing, not rewriting. JMeter does not alter the file on disk. On each iteration, a thread takes the next line, splits it at the delimiter, and assigns each field to a variable name in order. Characters are not reversed, mirrored, restyled or substituted. Apart from optional quote handling, the stored characters in a field are passed to the variable as they are.

Values can still differ from what you expected because of how the file is decoded and split. The settings below decide that.

Setting | What it controls | Practical note
Filename | Path to the data file | Relative paths are resolved against the directory of the saved test plan. Save the plan before relying on a relative path.
File encoding | Character set used to decode the file | If left blank, the platform default is used. Set it explicitly, for example UTF-8, when the data contains non-ASCII characters.
Variable Names | Names assigned to the columns, in order | Enter them comma-separated. If left empty, the first line of the file is read as the header.
Ignore first line | Skips a header row | Only relevant when Variable Names is filled in. Otherwise the header is consumed as the names.
Delimiter | Character that separates fields | Use \t for tab-separated files.
Allow quoted data? | Whether double-quoted fields are honored | Needed when values contain the delimiter. A literal double quote inside a quoted field is written as two double quotes.
Recycle on EOF? | Whether reading restarts at the top | When true, rows are reused once the file runs out.
Stop thread on EOF? | Whether a thread stops at end of file | Applies when recycling is off. If both are off, variables are set to <EOF> after the last row.
Sharing mode | Which threads share one read position | Options are all threads, the current thread group, the current thread, or a named identifier.

Illustrative configuration

The following example is illustrative and was not run against a specific JMeter version. It shows a header row, a quoted field containing the delimiter, and an escaped quote.

users.csv
username,password,display_name
alice,secret1,"Smith, Alice"
bob,secret2,"Bob ""BJ"" Jones"

CSV Data Set Config
  Filename:            users.csv
  File encoding:       UTF-8
  Variable Names:      (empty - header line is used)
  Delimiter:           ,
  Allow quoted data?:  True
  Recycle on EOF?:     False
  Stop thread on EOF?: True
  Sharing mode:        All threads

Sampler body
  user=${username}&pass=${password}

With quoted data enabled, the third field of the first data row should become Smith, Alice, and the second should become Bob "BJ" Jones. With quoted data disabled, the comma inside the first value would split it into an extra field, and the columns after it would shift.

Will the data stay readable and usable after copying or sharing?

Most problems with this element come from the file, not from JMeter. The file is plain text, so it survives copying well. Editors and spreadsheet tools can still change it in ways that are hard to see.

  • Spreadsheet exports may use a different delimiter, such as a semicolon, depending on the locale. Check the actual separator before setting the Delimiter field.
  • Saving from some editors adds a byte order mark at the start of a UTF-8 file. If it is not handled, it can attach to the first header name or the first value. Test this in your JMeter version rather than assuming either way.
  • Copying values through word processors or chat tools can swap straight quotes for curly ones. Curly quotes do not act as CSV quote characters.
  • Leading and trailing spaces, and tabs pasted into a comma-delimited file, become part of the field unless your version documents otherwise. Treat whitespace as significant.
  • Line endings usually differ between Windows and Unix systems. Confirm that a stray carriage return does not end up in the last column's values.
  • In distributed testing, each load generator reads its own local copy of the file. The file must exist at the expected path on every machine, and rows are not divided between machines automatically.

On accessibility, the data is ordinary text, so screen readers and search tools treat it like any other plain-text file. The real accessibility limits are in the editors you use to maintain it and in the JMeter interface itself. No scoped tests with specific assistive technologies were provided, so this review makes no claim about how particular tools behave with JMeter's configuration screens.

Checks before relying on the data

  • Run a short test with one thread and a Debug Sampler or View Results Tree. Confirm that each variable holds the expected value, especially the first and last columns.
  • Test a row that contains your delimiter, a quote character and any non-ASCII text you expect in production.
  • Match the number of data rows, the thread count and the end-of-file settings. This avoids silent reuse of rows or variables that come through as <EOF>.
  • Keep a header row or a documented column order with the file, so that later edits do not shift columns without anyone noticing.

Gaps in this review

No version-specific documentation excerpts, benchmark results or environment tests were supplied for this article. This review does not cover the element's performance with very large files, its exact handling of byte order marks, blank lines or whitespace trimming in a given JMeter release, or the behavior of specific assistive technologies with the JMeter interface. Verify these against the component reference for your installed version, using a small controlled test.