2 Minutes To Code (β Version)

JMeter - 2 minute tutorial

Example of Random Controller (sample usage)

A Random Controller will make one of samplers contained in it run in each loop of the thread and this sampler will be randomly selected.

In the examples of images shown below, the thread-group has a loop-count of 5 and the number of threads as 1. 3 http samplers are used, namely Issues Request, Changes Request and Home Request. So, a total of 15 (5 * 3 ) http urls will be hit when not using any logic controller. When using Random Controller with a thread group of loop-count 5, only 5 http requests will be hit (one for each hit chosen randomly).

Notice in the results in Image 2 below that the urls are in sequential order when run without Random Controller and are 15 in number.

Notice in the results in Image 3 below that the urls are in random order when run with Random Controller and are only 5 in number.

Image 1 : Adding Random Controller

Image 2 : Result without using Random Controller

Image 3 : Result when using Random Controller