Reputation: 788
I want to create a Thread Group in jmeter to create users and their devices with many (for example 5000) devices.
I have no problem to create this test and I want to have the name of the users and device in a correlative order.
1. user1--device1
2. user2--device2
3. user3--device3
I already created the test but to create 5000 users and devices in the same Thread Group I need to run 5000 iterations with 3 requests each, using 1 thread, because otherwise I have the same user name repeated by multiple threads (for example with 3 threads)
1. user1--device1
2. user2--device2
3. user3--device3
4. user1--device1
5. user2--device2
6. user3--device3
7. user1--device1
8. user2--device2
9. user3--device3
My question is: is there any way to share the loop counter between threads in order to create 5000 users/devices with more than one thread (for example 20 threads). This will help me a lot because instead of waiting for 20 minutes, it will be a minute to create the users.
Many thanks!
Added explanation I want for example maximun 9 devices (counter_max) but I want to run it with 3 threads. I want the result be like that
Upvotes: 6
Views: 5051
Reputation: 168002
I think you can implement it using __counter() function in "global" mode, like: ${__counter(FALSE,)}
__counter()
function returns incremented value each time it's being calledSo you should be able to use as many threads as required and each thread will use the next counter value to create your users and devices with multiple threads.
See How to Use a Counter in a JMeter Test article for comprehensive information on using "counter" config element and function.
Upvotes: 4