JMETER

LOGICAL CONTROLLERS:

LOGICAL CONTROLLERS:

Logical controllers help to control the processing order of samplers in a thread group. They help customise the logic that JMeter uses to determine when to send requests to the server. The order of the incoming request can be changed by the Logic Controllers from their child elements. Different logical controller provided by JMeter are:

Critical Section Controller – It ensures that the child elements are accessed by only one thread at a time.

ForEach Controller - This controller is used to perform the requests in a loop.

Include Controller
Include controller is used to add an external a test to the existing test case. This is done by loading the jmx file in the Include Controller’s control panel.

Interleave Controller
This Controller is used to select and execute a single child element among multiple children in each iteration of the loop. For example- if there are 3 samplers added as child to an Interleave Controller than the in first iteration it will pick the first sampler request, in the next iteration it will pick the subsequent one and so on. Once the child elements are over, it again starts iteration from the first element.

Loop Controller
This is used to execute the operations specified in a loop. We define the iteration value is specified in its control panel.

Module Controller
This is used to reuse a test fragment (e.g., a sampler) into our script again. This is done by selecting the module from the Module Controller’s control panel.

Once Only Controller
The once only controller is used in cases where we wish to perform an operation only once even if the operation is part of a loop.

Random Controller

It is similar to a random controller and picks a single child element in each iteration but unlike the Interleave controller it picks the child element randomly.

Random Order Controller
Random Order controller is used to execute each child element at least once in a   random order.

Recording Controller
Recording controller is used as a placeholder where the scripts recorded using HTTP Proxy Server are saved by default

Runtime Controller
Runtime controller is used to limit the execution time its child elements. 

Simple Controller
This controller is used for grouping and ordering the different elements in a test plan.

While Controller

The While controller runs the child elements inside it until the condition specified turns false.

Add a Logical controller:
Right click Thread Group →Add →Logic Controller → (as necessary)

Logical controller example: Logic Controller is Loop controller which makes a request multiple times to the server.