Create a CSV file
First, create a CSV file with the data that you want to use in your JMeter test. The first row of the CSV file should contain the column names, and each subsequent row should contain the corresponding data.
For example, if you want to test a login functionality of a website, you can create a CSV file with two columns, “username” and “password”, and each row representing a set of login credentials.
Add CSV Data Set Config element
Next, add a CSV Data Set Config element to your JMeter test plan. This element can be found under the “Config Element” section in the JMeter GUI.
Configure the CSV Data Set Config element
In the CSV Data Set Config element, specify the path to the CSV file that you created earlier in the “Filename” field. You can also specify other settings such as delimiter and variable names. Note that you should put the name of the file and put this file in the same folder as the JMX file. Otherwise you will need to use a JMeter property.
Use variables in your test plan
Now you can use the variables defined in the CSV file in your JMeter test plan. For example, you can use the ${username} and ${password} variables in an HTTP Request Sampler to simulate a login request.
To use the variables, simply enclose them in curly braces, like ${variable_name}.
Run your test plan
Finally, run your JMeter test plan and JMeter will automatically pick up the data from the CSV file and use it in your test.
That’s it ! You have now successfully used a CSV file in your JMeter test plan.
About UbikLoadPack:
- Ubik Load Pack is a set of Enterprise Grade plugins for Apache JMeter.
- We’re strong contributors to JMeter and its eco-system
- We provide professional services for Load Testing
- Free trial is available on https://ubikloadpack.com/tryout.php
Other links:
Recent Posts
- UbikLoadPack Video Streaming Plugin 9.1.5 14 June 2024
- What is DASH multi period and when to use it ? 4 December 2023
- UbikLoadPack Java Serialization Plugin 23 November 2023