Skip to content

Interleave Controller

Configure the JMeter Interleave Controller logic controllers: properties, defaults, and practical usage notes for building reliable load tests.

Difficulty
intermediate
Guide type
reference
Estimated read time
2 min read
Last verified version
Verified JMeter 5.6

Part of the Logic Controllers category. Also documented in context in the full Component Reference.

Interleave Controller

If you add Generative or Logic Controllers to an Interleave Controller, JMeter will alternate among each of the other controllers for each loop iteration.

NameRequiredDescription
nameNoDescriptive name for this controller that is shown in the tree.
ignore sub-controller blocksNoIf checked, the interleave controller will treat sub-controllers like single request elements and only allow one request per controller at a time.
Interleave across threadsNoIf checked, the interleave controller will alternate among each of its children controllers for each loop iteration but across all threads, for example in a configuration with 4 threads and 3 child controllers, on first iteration thread 1 will run first child, thread 2 second child, thread 3 third child, thread 4 first child, on next iteration each thread will run the following child controller

Download this example (see Figure 1). In this example, we configured the Thread Group to have two threads and a loop count of five, for a total of ten requests per thread. See the table below for the sequence JMeter sends the HTTP Requests.

Figure 1 - Interleave Controller Example 1 Figure 1 - Interleave Controller Example 1

1News Page
1Log Page
2FAQ Page
2Log Page
3Gump Page
3Log Page
4Because there are no more requests in the controller, JMeter starts over and sends the first HTTP Request, which is the News Page.
4Log Page
5FAQ Page
5Log Page

Download another example (see Figure 2). In this example, we configured the Thread Group to have a single thread and a loop count of eight. Notice that the Test Plan has an outer Interleave Controller with two Interleave Controllers inside of it.

Figure 2 - Interleave Controller Example 2 Figure 2 - Interleave Controller Example 2

The outer Interleave Controller alternates between the two inner ones. Then, each inner Interleave Controller alternates between each of the HTTP Requests. Each JMeter thread will send the requests in the following order: Home Page, Interleaved, Bug Page, Interleaved, CVS Page, Interleaved, and FAQ Page, Interleaved.

Note, the File Reporter is configured to store the results in a file named “interleave-test2.dat” in the current directory.

Figure 3 - Interleave Controller Example 3 Figure 3 - Interleave Controller Example 3

If the two interleave controllers under the main interleave controller were instead simple controllers, then the order would be: Home Page, CVS Page, Interleaved, Bug Page, FAQ Page, Interleaved.

However, if “ignore sub-controller blocks” was checked on the main interleave controller, then the order would be: Home Page, Interleaved, Bug Page, Interleaved, CVS Page, Interleaved, and FAQ Page, Interleaved.

On this page