Properly AJAX requests is a tricky thing as they are executed in parallel, i.e. when real user using real browser logs in – 7 parallel requests are being fired at the same time.

This can be worked around if you use Parallel Controller to represent these AJAX requests. You can also put the main request and the Parallel Controller under a Transaction Controller to get cumulative time for all requests.

Also don’t forget about correlation, in the absolute majority of cases you cannot just record and replay your test as modern web applications widely use cookies, session identifiers, tokens, etc. for security and client-side state tracking reasons. It means that at least one request parameter will change each time you execute the request therefore you need to extract it from the previous response.

So your test plan outline would be something like:

  • HTTP Cookie Manager (to represent browser cookies)
  • First HTTP Request (open login page)
  • Transaction Controller
    • Second HTTP Request (perform login. Here you will need to replace recorded hard-coded values with Variables from the previous step)
    • Parallel Controller
      • AJAX Request 1
      • AJAX Request 2
      • AJAX Request 7



Source link https://sqa.stackexchange.com/questions/35116/load-testing-using-jmeter

LEAVE A REPLY

Please enter your comment!
Please enter your name here