The mobile app that I am testing with Jmeter makes 4 asynchronous API calls when logging in. Is there any way to simulate this with JMeter ?
Currently I can only get JMeter to make the calls synchronously, so when wrapping them all in the same transaction controller, the response time is the total of the 4 calls (instead of the highest one)
Many thanks
Currently JMeter doesn't offer a relevant test element, the easiest way of implementing your scenario is using JSR223 Sampler to perform nested asynchronous calls, something like:
See How to Load Test AJAX/XHR Enabled Sites With JMeter guide for more detailed explanation, code snippets,etc.
You can also consider developing a custom sampler with similar functionality and make it a part of your JMeter as a plugin or even share it with the community.
Take a look at Parallel Controller in JMeter.
All elements inside the Parallel Controller will be executed parallel to each other. This way, you will have one main flow and other flows with asynchronous requests, which will be executed in a parallel way.
https://www.blazemeter.com/blog/how-to-load-test-async-requests-with-jmeter
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With