Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Performance Testing of AJAX calls via JMeter

I am doing performance testing for an application that has AJAX calls. I am able to record the same requests but unable to execute them. Can anyone help me in execute the AJAX requests, please?

Do I need to use any extra plugin for this? If yes, what are they and how to I use them.

like image 875
user3627319 Avatar asked Sep 03 '14 09:09

user3627319


1 Answers

I'm not aware of any existing plugins which are capable of handling AJAX calls. Technically AJAX requests are basic HTTP Requests but they need to be executed in parallel using one extra thread per call.

For the moment it is not possible to have nested thread groups in JMeter so you'll have to do some extra coding using JSR223 Sampler to kick off AJAX requests. Main request and nested AJAX calls should be placed under Transaction Controller to look like a real-browser behavior.

Alternatively you can develop your own JMeter Sampler which will be able to spawn extra threads to simulate AJAX requests.

For details on 2 approaches above see How to Load Test AJAX/XHR Enabled Sites With JMeter guide.

like image 104
Dmitri T Avatar answered Nov 15 '22 08:11

Dmitri T