Step 1: Configure JMeter for CSV file image upload.
- Launch Jmeter
- Right Click on Test Plan --> Add--> Threads (Users) --> Thread Group
- Right Click on Thread Group --> Add --> Sampler --> HTTP Request
- Now, fill the value in the appropriate fields.
- Method = "POST"
- Make sure "Use multipart / form-data" checkbox is checked.
- Click on the Files Upload tab and fill in the details as described below.
- File Path: Here, enter parameter name between the dollar and curly brackets. Like: ${image}
- Parameter Name: Give the appropriate name of the image parameter.
- MIME Type: Enter the MIME type as per the selected images for upload.
- image/png
- image/jpeg
- image/jpg
- image/bmp
- image/webp
- image/gif
Step 2: Create CSV file for image path
- Press the window button of the computer and enter excel and open the excel file.
- Now enter the full path of the images with the image name and extensions in a single column.
- Then save this file as a CSV file(Comma-Delimited).
Step 3: Create CSV Data set config in Jmeter
- Right Click on Thread Group --> Add --> Config Element --> CSV Data Set Config
- Fill appropriate details in the config file as below steps.
- Filename: By browse option select CSV file.
- Variable Name(comma-delimited): Enter the parameter name of the image file for Web Services/API.
- Select other options as below image.