vlatko606
vlatko606

Reputation: 1149

Jmeter - Can't uppload csv file

When i try to uppload file using Jmeter

I use 'File Upload section' like:

Filepath as:${filesUpploadPath}BatchReverse.csv

ParameterName as: file

MIME type: text/plain

enter image description here

enter image description here

enter image description here

Request

POST data: --TQVDXTBd3I5-r4QtHZ2WSa5B2rsQKtLv Content-Disposition: form-data; name="file"; filename="BatchReverse.csv" Content-Type: text/plain Content-Transfer-Encoding: binary

--AzTQVDXTBd3I5-r4QtHZ2WSa5B2rsQKtLv--

Response {"errors":[{"type":"FATAL","errorCode":"VALIDATION","message":"Missing required parameter fileType."}]}

Any suggestion?

Upvotes: 0

Views: 576

Answers (2)

Dmitri T
Dmitri T

Reputation: 168072

Most probably your "Parameter Name" is wrong, you're using file and your application seems to be expecting fileType

The easiest way of building a proper file upload request is just recording it using JMeter's HTTP(S) Test Script Recorder

The only thing you need to do is to copy the file you're uploading to "bin" folder of your JMeter installation, this way JMeter will be able to properly construct the relevant HTTP Request sampler.

Once you get the "good" configuration and validate it using View Results Tree listener you can parameterize and correlate the request as needed.

Upvotes: 1

vlatko606
vlatko606

Reputation: 1149

Tried with Jmeter recorder, and i supposed to used: -MIME type as: application/vnd.ms-excel -Parameters : fileType: REVERSALS

Upvotes: 0

Related Questions