3
votes

I have issues recording a file upload request using JMeter Proxy. The file could be selected with the browse option and on pressing the SAVE or SUBMIT button the page refreshes and goes to the initial state.

I'm working on a load test project on a On-Premise SharePoint(v2013) Website with the following conditions,

  1. Form-based authentication - Login and session cookies are working correctly with JMeter.
  2. Need to pass few dynamic variables like __EVENTVALIDATION, __VIEWSTATE, __REQUESTDIGEST, __VIEWSTATEGENERATOR which needs to be extracted using a RegEx Extractor in JMeter from every request and needs to be passed to subsequent POST request as parameters.

As a workaround, I used BlazeMeter Chrome Extension to record the file upload requests and all the API calls could be recorded correctly. But has issues replaying it in JMeter. The file upload fails again even though all the requests pass.

  1. All the file upload POST requests passes with a success response code of 200 and gives the same HTML content as the response, while replaying it in JMeter, but the file never gets uploaded.
1

1 Answers

1
votes

If you are absolutely sure that you have HTTP Cookie Manager in place, correlation is working fine, etc. in order to record the file upload request it should be just enough to put the file to JMeter's "bin" folder so HTTP(S) Test Script Recorder could locate it.

Make sure the file is present in the JMeter's "bin" folder during replay as well. Check out Recording File Uploads with JMeter guide for more comprehensive explanation of the limitation.


If it doesn't help your JMeter configuration is still not correct. The common practice is capturing a request from a real browser and from JMeter using a sniffer tool like Fiddler or Wireshark. This way you will be able to inspect requests on a low level and identify the differences. Once you find out the cause - amend JMeter configuration so the request originating from JMeter would look exactly as the one which comes from the browser.