In my test plan after login i am clicking on link, that link makes call to 10+ different services to show data. With current test plan all those 10+ service goes in sequential format i wan't know if there is a way i can call all of them at same time. I can create multiple thread to achieve this, but as i have more links to add and it will create more thread and more login instance. Just wanted to get suggestions if i can do something using logical controllers available in Jmeter?
2 Answers
Unfortunately each thread always runs sequentially (the only exception is retrieval of embedded resources in HTTP sampler, but this is now useful in your case). There are a few options:
Use multiple threads with Random Order Controller or Random Controller
Use Thread Groups running on parallel. And in order to not duplicate your code in each thread group, use Module Controller
I saw jmeter-parellarel-request, but I have no experience with it, so cannot recommend

- 12,648
- 10
- 46
- 77
-
Thanks. I am trying 3 option you suggest but its only getting executed once. Need to do more research. – Akshay Mar 24 '16 at 15:30
-
I usually go with option 2, since it's the closest to reality. There's also an option 4, but that one is complicated: the option is to create your own sampler, and do whatever you want there. – timbre timbre Mar 24 '16 at 15:33
-
Module option is again not same, i have 8 different calls which i need to make at same time, now if i consider i created 8 modules they will still not run in parallel right? Let me know if my understanding is wrong.. – Akshay Mar 31 '16 at 18:59
-
No, you make 8 Thread Groups, and configure your test plan to run them in parallel. Instead of duplicating your 8 calls, you configure each thread group to run the same module (which includes your 8 calls) using Module Controller. – timbre timbre Mar 31 '16 at 19:37
-
Thanks, Agree with thread we might not even need modular controller. But i was more trying inside single thread to make my reporting easy. – Akshay Apr 01 '16 at 21:28
As per the design, JMeter does not support sending multiple HTTP calls at the same time for a single user. It will send them sequentially only! So, you might not be able to simulate AJAX requests exactly as the browser does.
However JMeter has Beanshell sampler / JSR223 sampler through which you can implement that yourself.
See this example.
The approach might be ok for few threads/users. When i tried to follow similar approach for more than 20 threads, I got an Out of Memory error for a very simple test as it has to create multiple threads to simulate AJAX calls for each user.

- 15,030
- 3
- 36
- 47
-
Thanks for response, i think JSR223 will have limitation, i wouldn't be able to do Parameterization to manipulate data? Please correct me if i am wrong... – Akshay Apr 06 '16 at 19:26