OneSolitaryNoob
OneSolitaryNoob

Reputation: 5737

Jmeter csv config for file upload

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?

Upvotes: 1

Views: 2318

Answers (1)

Dmitri T
Dmitri T

Reputation: 168002

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:

Upvotes: 0

Related Questions