1
votes

I'm using Jmeter for testing file uploads. This works great when I upload just one file, but I want to be able to loop through a list of files. I see Jmeter has a CSV based config capability, but I can't figure out how to include a file as one of the params.

How can I specify a list of different files for jmeter to loop through, uploading one per request?

1

1 Answers

0
votes

You need to pass:

  • either relative or full path to the file being uploaded
  • upload input name
  • file MIME type

So if your CSV file will look like:

c:/testfiles/test.txt,upload,text/plain
c:/testfiles/test.jpg,upload,image/jpeg
etc.

And CSV Data Set Config is configured as:

CSV Data Set

Your HTTP Request Sampler configuration should look somehow like

HTTP Request Sampler

References: