In JMeter you can pass CSV data using the 'CSV Data Set Config' element implemented in your JMeter script. As BlazeMeter is 100% JMeter compatible, you can use the same method by uploading the CSV to the BlazeMeter web application.
How to specify the CSV data file path ?
The CSV Data Set Config element has a field called "Filename" where you need to specify the file name of your CSV along with its path.
By default JMeter starts to look for data files in the JMeter root/home folder (\apache-jmeter-X.XX\bin) or the same folder where the JMeter script(.JMX file) resides.
When you run a test in BlazeMeter, a cloud instance is created to which all the files uploaded in your test are copied - to the JMeter home directory of this instance. Hence just specify the file names without a path.
For example if you upload a file named: my_file.csv, simply use the name: my_file.csv as the file name (no path) or /home/jmeter/my_file.csv in CSV data set Config element.
All files get downloaded to all of the running JMeter engines as well as to the JMeter console.
How many files can I add in a BlazeMeter test ?
You can add any files you need to be used as part of your script during your test.

What is the maximum file size?
Run a multi-engines test with a single CSV file
If you wish to run a multi-engine test with a single CSV file for all engines without using duplicate values, , select the Split CSV files with a unique subset per engine checkbox in the Scenario Definition.
For example: You run a 1000-concurrent-users test, on 5 engines. You have uploaded a CSV file containing 1000 unique user names to simulate a registration scenario. Enable the 'Split CSV files' checkbox, and when the test is initiating, the CSV file will be split 5 ways and each unique subset will be directed to a different engine.
Split CSV Files will not preserve the header across engines. Best practice is to always omit the header row in the CSV file and to declare variable names in the CSV Data Set Config instead. This ensures that you can always find where variables are set by searching in your JMX files.
Run a 'Multi Test' with a single CSV file
A Multi Test is a feature which enables you to run several tests simultaneously. Please refer to this article for more information regarding the Multi Test. If you wish to use one CSV data set for the entire Multi Test (unique data sets per engine, per test) then click on 'Data Files' and then upload the CSV into the pop up window. You will then be presented with a choice whether to split the CSV or not.
How to set up a different CSV file for each JMeter engine?
If you want to use multiple JMeter engines with a different CSV file per JMeter engine, you will need to upload a different file for each JMeter engine and use a parameter to differentiate each file.
Each JMeter engine uses a distinct parameter ${__P(InstanceID)}. Please note that the “InstanceID” values start from 1 for the JMeter engines.
In the example above, in case you are using two JMeter engines, you can upload files named file1.csv and file2.csv. In the CSV “Filename” field you should specify: file${__P(InstanceID)}.csv.
The first JMeter engine will read file1.csv. The second will read file2.csv.
2 Comments