0

Does anyone knows how to test ajax URL in JMeter?

As I m working on performance testing of salesforce application.

When I'm doing ajax URL testing, I got the below server error.

Thread Name: Admin Users 1-1 </n>
<br>Sample Start: 2018-02-08 15:45:50 IST</br>
<br>Load time: 133
<br>Connect Time: 0
<br>Latency: 133
<br>Size in bytes: 1245
<br>**Sent bytes:463
<br>Headers size in bytes: 979
<br>Body size in bytes: 266
<br>Sample Count: 1
<br>Error Count: 1
<br>Data type ("text"|"bin"|""): text
<br>Response code: 500
<br>Response message: Server Error
<br>Response headers:
<br>HTTP/1.1 500 Server Error
1

As per 500 Internal Server Error description:

The HyperText Transfer Protocol (HTTP) 500 Internal Server Error server error response code indicates that the server encountered an unexpected condition that prevented it from fulfilling the request.

This error response is a generic "catch-all" response. Sometimes, server administrators log error responses like the 500 status code with more details about the request to prevent the error from happening again in the future.

So you should look into your server log in order to find out the cause of the issue. Most probably your request was either syntactically incorrect or missing some essential data (i.e. cookie or header)

If you don't have access to server logs you can compare what is being sent by the real browser and by JMeter using a sniffer tool like Fiddler or Wireshark and amend JMeter configuration so the request would be exactly the same as browser for the real browser.

Also if you're testing an AJAX-based application you may find Parallel Controller extremely useful

  • i would guess the content type was not correct it should be application/json – Amias Feb 8 '18 at 13:53
  • Thanks! for aforesaid info. Looks like issue has been resolved now. – rakeshghl44 Feb 9 '18 at 11:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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