3

I am using JMeter to load test an Uber-like application. I have set it up so that in the first thread group the user logs in makes one request for a ride. In the second thread group "Drive Login" the user accepts the request, starts the ride from source and completes the trip when he reaches the destination.

I'm simulating this scenario with 10 users and 3 drivers so the request will come from the 10 users, then it will go to 3 drivers so they will first complete 3 requests, then three more, and so on up to 9 (I did it using a for loop controller) request means 9th user request and one user request will remain (10th user).

When I get this far, all 3 drivers will start the trip for 10th user and it is never completing. That should not happen - one driver should accept one user request. How do I restrict the drivers so I do not have a user taking more than one trip at the same time?

I used BeanShell assertion to interlink the thread, which is working fine. The problem is how to assign the remaining user to only one driver.

I don't know how to do that in JMeter. Is this possible?

enter image description here

1 Answer 1

1

I think the easiest solution would be going for Inter-Thread Communication plugin, this way you can make threads of Driver-Thread Group to wait for threads from the User-Thread Group.

See SynchronizationPluginsExample.jmx for using Inter-Thread Communication Pre and Post Processors for passing the data between thread groups.

You can install Inter-Thread Communication Plugin using JMeter Plugins Manager

JMeter Inter Thread Communication

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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