Apache Jmeter is performance testing tool and you need to customize your software web application test plan as per client's requirement. Jmeter has many tools for test plan customization and one of them is Logic controllers. We will see more about other parameters of load testing tool jmeter but in this post let we lookat one more controller named Random Controller.
Note : You can read full tutorial on apache jmeter on this link.
As you know, controllers in jmeter are useful to control execution flow in different ways. Random controller will execute any request randomly. It will pick any request from it's request tree and force to execute is. Every time it will pick different request randomly. Let we take simple example as shown in bellow given image.
Added Random Controller and moved 3 requests under it. (Read this Post to know how to add manually controller in apache jmeter.) Set Loop Count = 1 and Number of Threads (users) = 2 in thread group properties. Added View Results Tree listener to view request execution sequence. Now run this test. View Results Tree listener shows me results as shown in bellow image.
Look in to above example, both users has accessed 'Login page' request and 'My Account Page' request but then one user has accessed 'My Orders Page' and one has accessed 'FAQ Page'. Why both user has not accessed any one request? Answer is random controller.
Conclusion is that - Every time random controller will select any request from it's sub requests and it will force that request to execute.