How to call JMeter parameters from a CSV file?

In JMeter, you can parameterize a CSV file by following these steps:

  1. Add the “CSV Data Set Config” component to the test plan. You can add it by right-clicking on “Thread Group” -> “Add” -> “Config Element” -> “CSV Data Set Config”.
  2. Set the following properties in the “CSV Data Set Config” component’s attribute window.
  3. The filename specifies the path of the CSV file. You can use either the absolute path or the relative path.
  4. Variable Names: Specify the column names in the CSV file, separated by commas. These column names will be used as JMeter variables in the test.
  5. Delimiter: specifies the data separator in a CSV file.
  6. Recycle on EOF: If this option is checked, the data rows from the CSV file will be reused when they are exhausted.
  7. Selecting this option will stop the thread when the CSV file runs out of data lines.
  8. In requests requiring parameterization, reference column data from a CSV file using the format ${variable name}. For example, if there is a column named “username” in the CSV file, you can reference the data from that column in the request using ${username}.
  9. During the test execution, JMeter reads the CSV file line by line, stores the column data as JMeter variables, and replaces the corresponding variable values in each request.

Please ensure that the path to the CSV file is correct and that the column names in the CSV file match the referenced variable names.

bannerAds