Monday, August 31, 2020

Jmeter Controllers - Interleave Controller

In Jmeter, logic controllers is very important component and it is useful when you want to build scenario with some logics/conditions/percentage distributions. This will determine the order in which sampler are processed in Jmeter.

Jmeter supports many logic controllers. In this series of posts, we will go through frequently used logic controllers one by one. However, I am going to explain the way it works in Jmeter (just a mechanism).

Let us start. First we will see how to add logic controller in test plan.

1. Interleave controller

This controller execute the alternate samplers for each iteration. For example, if you have 5 samplers under this interleave controller and you are executing for 5 iterations. In this case, First sampler will be executed for first iteration alone and second sampler will be executed for second iteration alone and go on until 5 iterations complete.

Let us see how this controller works in practical.

Step # 1: Add the Interleave controller into test plan.

Step # 2: In this test plan, I have 6 HTTP samplers. Out of 6 samplers, I placed 5 samplers under Interleave Controller. I am going to execute the test plan for 5 iterations with 1 user.

Step # 3: Add listener "View Results Tree" to the test plan.

Step # 4: Execute the test plan.

As you see the above snapshot, First sampler (LIST USERS) is executed in every iterations (Total 5 times). Where as, the samplers are placed under Interleave Controllers executed in alternate manner such as first sampler in Interleave controller (SINGLE USER) is executed in first iteration and others are not executed in first iteration. Similarly, second sampler in Interleave Controller (SINGLE USER NOT FOUND) is executed along with LIST USERS sampler in the second iteration and others are not executed.

That's all. Simple, isnt' it?




Linux Series - SED Utility/Package - 4. Deleting Lines

Let’s explore sed’s explicit delete command, which you specify by using the option 'd'. Again, we are using the sample file named &#...