0
votes

can someone please help me with uploading a file on JMeter I feel its very tricky thing...

let me share the screen shot of what I've done

enter image description here

Its failing with below error: Thread Name:jp@gc - Ultimate Thread Group 2-4 Sample Start:2021-02-04 17:28:44 IST Load time:562 Connect Time:0 Latency:562 Size in bytes:595 Sent bytes:84568 Headers size in bytes:446 Body size in bytes:149 Sample Count:1 Error Count:1 Data type ("text"|"bin"|""):text Response code:500 Response message:

HTTPSampleResult fields: ContentType: application/json DataEncoding: null

Response Body: {"timestamp":"2021-02-04T11:58:45.482+00:00","status":500,"error":"Internal Server Error","message":"","path":"/pps/storage/upload-image"}

Request Body: POST https://pixelperfectdevexternal.useready.com/pps/storage/upload-image

POST data: --axOhwnTOrVj2VWGGuxcaqfjgHwGQKsTFl Content-Disposition: form-data; name="filename" Content-Type: image/jpeg; charset=US-ASCII Content-Transfer-Encoding: 8bit

${filename} --axOhwnTOrVj2VWGGuxcaqfjgHwGQKsTFl Content-Disposition: form-data; name="filename"; filename="Passport size photo.jpeg" Content-Type: image/jpeg Content-Transfer-Encoding: binary

<actual file content, not shown here> --axOhwnTOrVj2VWGGuxcaqfjgHwGQKsTFl--

I'm totally stuck on this from last 3 weeks, I did what was told in tutorials and still its not working, someone please help me out.

1
The HTTP response code indicates that the request is not handled by the server. Check if you are able to make the file upload request from Postman or not.Teja Goud Kandula
If there is any HTTP header configured for this HTTP request can you share an image showing that.Teja Goud Kandula

1 Answers

0
votes

We don't know how to fix the issue because we don't know how the request should look like, moreover you don't show us "Parameters" tab of the HTTP Request sampler and HTTP Header Manager configuration.

So if you have another way of successfully calling this API like curl or Postman or other tool - you should be able to record the request using JMeter's HTTP(S) Test Script Recorder, see How to Convert Your Postman API Tests to JMeter for Scaling article for example setup.

If not, you need to check your API endpoint documentation, application logs or ask around for the proper request format, once you know it you should be able to amend the request yourself or provide us more details so we could assist.