Search code examples
apijmeterperformance-testing

Bad request. We can't connect to the server for this app or website at this time. -on api testing though jmeter


Sending the request through jmeter returns - bad request. We can't connect to the server for this app or website at this time. There might be too much traffic or a configuration error. Try again later, or contact the app or website owner.

Im able to send the request successfully through postman and get a valid response. I've already put the headers in jmeter header manager as is on postman enter image description here

enter image description here


Solution

  • If the request is successful in Postman my expectation is that given you send the same request from JMeter you should get the same successful response.

    If you cannot figure out the differences just record the request from Postman

    1. Prepare JMeter for recording. Start HTTP(S) Test Script Recorder from the recording template.

      enter image description here

    2. Prepare Postman for Recording

    3. Run your request in Postman

    4. JMeter will generate the appropriate HTTP Request sampler and HTTP Header Manager

      enter image description here

    You may also want to take a look at How do I troubleshoot 403 errors from CloudFront? AWS documentation chapter