Reputation: 303
When I use bean shell script to preload the file to a variable and then set it in parameter of HTTP request sampler to upload file, from the wireshark packets I find that the content-length is not right. Also the content-type is set to text/plain which cause problem. How can I change it?
Below are some pictures to show the jemter setup and wireshrak snoops.
The wireshark snoop when the content of the file set as the value of the parameter of the Http request sampler The jmeter test element setup showing that the the content of the file is set in the http request parameter
Upvotes: 1
Views: 9343
Reputation: 168042
You're using wrong configuration:
Use multipart/form-data for POST
boxParameters
areaAdd it to Send Files With the Request
area like:
See Performance testing: Upload and Download Scenarios with Apache JMeter guide for more information on simulating file upload and download events in your JMeter script.
Upvotes: 2