0

keep getting error code 403 when executing POST request to Upload file. The system is using oauth2 authorization. i'm able to execute login, navigate to page but keep failing and getting 403 when execute upload file script.

Upload is in 2 steps:

  1. CreateOrEdit endpoint to create the file entry in Fulcrum+ - working okay and able to get the response
  2. Upload endpoint to upload the binary into the file created in 1) in chunks -- failed and getting 403 error

Please help as I'm new to Jmeter. thanks

1 Answer 1

0

As per HTTP 403 status code description

The HTTP 403 Forbidden client error status response code indicates that the server understands the request but refuses to authorize it.

So unless it's a bug in the application under test side it seems that your user doesn't have permissions to upload files.

If this is not the case and you can upload the file(s) successfully using browser it may mean that your request to upload the file is not correct, cross check the request from JMeter with the one from the browser and make sure they're absolutely the same.

Also be aware that it's possible to just record the file upload request using JMeter's HTTP(S) Test Script Recorder, you will need to copy the file(s) you're going to upload to "bin" folder of your JMeter installation, this way JMeter will be able to properly capture the request and generate relevant HTTP Request sampler. More information: Recording File Uploads with JMeter

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.