Howto distribute outbound traffic in Jmeter
-
24-06-2021 - |
题
how jmeter can distribute outbound traffic between the two user groups. For example the group #1 gets 30% of the traffic and the group #2 of 70%.
解决方案
Not sure I understand your requirement as Oliver did, for me you just setup a Thread Group with 30% of the total threads and the second one with 70%.
Otherwise, you can read this article with is another way to do the way Oliver understood:
It shows how to distribute but contrary to Throughput Controller it ensures at least one sample is executed.
其他提示
There are various ways you can do this. You could use a Throughput Controller which is pretty simple, or, if you only ever want one request to fire, you could create a simple Random Variable, set it as a random number between 0 and 10 and then use an If Controller to control execution.
Something like:
Thread Group
- Random Variable 0 - 10
- If Controller set to ${myVar} <= 3
HTTP Sampler
- If Controller set to ${myVar} > 3
HTTP Sampler