You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Current »

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.

Control Panel
http://jakarta.apache.org/jmeter/images/screenshots/logic-controller/interleave-controller.png

Parameters

Attribute

Description

Required

name

Descriptive name for this controller that is shown in the tree.

No

ignore sub-controller blocks

If checked, the interleave controller will treat sub-controllers like single request elements and only allow one request per controller at a time.

No

Simple Interleave Example

[http://jakarta.apache.org/jmeter/demos/InterleaveTestPlan.jmx 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.

http://jakarta.apache.org/jmeter/images/screenshots/logic-controller/interleave.png BR
Figure 1 - Interleave Controller Example 1

Loop Iteration

Each JMeter Thread Sends These HTTP Requests

1

News Page

1

Log Page

2

FAQ Page

2

Log Page

3

Gump Page

3

Log Page

4

Because there are no more requests in the controller, JMeter starts over and sends the first HTTP Request, which is the News Page.

4

Log Page

5

FAQ Page

5

Log Page

Useful Interleave Example

[http://jakarta.apache.org/jmeter/demos/InterleaveTestPlan2.jmx 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.

http://jakarta.apache.org/jmeter/images/screenshots/logic-controller/interleave2.png BR
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.

http://jakarta.apache.org/jmeter/images/screenshots/logic-controller/interleave3.png BR
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.

  • No labels