Devang
Devang

Reputation: 385

How to pass form-data while calling API using Jmeter?

I want to make an API call using Jmeter.

In my API call, I'm sending a file with a request, and I need to specify the file name as form-data.

e.g. when I call the same API from postman !enter image description here

How do I, specify a filename when I make above call from Jmeter?

Jmeter call :

enter image description here

Upvotes: 3

Views: 25513

Answers (1)

Dmitri T
Dmitri T

Reputation: 168002

HTTP Request Sampler provides options to

  • set Use multipart/form-data for HTTP POST
  • send files with the request

Multipart upload

See Performance testing: Upload and Download Scenarios with Apache JMeter guide for detailed explanations and configuration instructions.

Upvotes: 4

Related Questions