0
votes

I am facing the issue when i try to upload file into the application after login into application, Manually it is working fine but when i tried to upload file using jmeter I am getting error can you please help me on this.

Screenshot of Jmeter HTTP

I have used the common approach to upload files but still I am getting message no document present as error. Http request screenshot

and after running my script i am getting this request and response request Response

However on successful submission it should show status as true and message as successfully uploaded. Screenshot of browser developer tools browser's request screenshot attached Please help

2
Can you make sure the image file is within your bin folder?Techno
Yaa I have added the file in Bin still its not working as it should be.Nishant Rajpal

2 Answers

0
votes

We cannot help without seeing:

  1. Successful request details from your browser developer tools
  2. Full details of the request and response from JMeter's View Results Tree listener
  3. The details of the file input and the relevant log of your application.

Given you're able to upload the image using the browser you could try recording your request using JMeter's HTTP(S) Test Script Recorder, just make sure to copy your PSM.png file to JMeter's "bin" folder, this way JMeter will be able to properly generate relevant HTTP Request sampler. See Recording File Uploads with JMeter article for more details.

0
votes

I still can't see your browser's request screenshot. It would have helped to understand what browser client is sending.

Anyway, I see from your Jmeter request screenshot that you aren't using cookie manager in your script. Can you please add 'HTTP Cookie Manager' in your script and give it a try?