---
description: If you want to control when to send a user request to a web server under test, what would you do?JMeter gives us a feature to do that.
title: "Controllers in JMeter: Loop, Logic, Transaction"
image: https://www.guru99.com/images/controllers-in-jmeter-1.png
---

[Skip to content](#main)

**⚡ Smart Summary**

Logic controllers in JMeter determine the order in which user requests run within a thread, with controllers such as Loop, Random, Simple, Module, and Recording shaping how a performance test plan sends requests to the server.

- 🎛️ **Logic Controllers:** Controllers set the order in which requests run in a thread.
- 🔁 **Loop Controller:** Runs a sampler a set number of times within the thread loop.
- 🎲 **Random Controller:** Runs the child requests in random order each loop.
- 🧩 **Module Controller:** Adds modularity by selecting which module runs.
- ⏺️ **Recording Controller:** Stores recorded test steps as a placeholder.
- 🤖 **AI Assistance:** AI helps design and analyze JMeter performance test plans.

Read More

![Controllers in JMeter](https://www.guru99.com/images/controllers-in-jmeter-1.png)

## What is the Logic Controller?

Logic Controllers let you define the order of processing request in a Thread. It lets you control “when” to send a user request to a web server. For example, you can use Random Controllers to send HTTP requests to the server randomly

Logic Controllers determine **the order** in which user request is executed.

Some commonly used Logic controllers are below:

[![The Logic Controller]()](https://www.guru99.com/images/LogicControllerClassification.png)

## Recording Controller

JMeter can **record** your [ Testing](https://www.guru99.com/software-testing.html) steps; a recording controller is a **placeholder** to store these recording steps.

[![Recording Controller]()](https://www.guru99.com/images/RecordingControllerJMeter.png)

## Simple Controller

Simple Controller is just a **container** for user request.

[![Simple Controller]()](https://www.guru99.com/images/SimpleController.png)

## Loop Controller

Loop Controller makes the user request run **a specified number of times** or run **forever** as shown in figure:

[![Loop Controller]()](https://www.guru99.com/images/LoopControllerJMeter.png)

## Random Controller

Random Controller makes all the user requests run in **the random** order in each loop period.

For example, you have 3 user requests to website [http://www.google.com](http://www.google.com/) in following order:

1. HTTP request
2. FTP request
3. JDBC request

These 3 requests should run 5 times. Total 15 user requests will be sent to Google server by JMeter.

In **sequential** order, requests are sent **sequentially** in following order:

HTTP request ->FTP request->JDBC request

for each loop.

[![Random Controller]()](https://www.guru99.com/images/SequentialVSRandomController.png)

In **random** order, requests are sent as **randomly,**

FTP request ->HTTP request->JDBC request

Or

JDBC request ->FTP request->HTTP request

For each loop.

**Don't Miss:**

- [How to Download & Install Apache JMeter (Windows)](https://www.guru99.com/guide-to-install-jmeter.html)
- [JMeter Timer: Constant, Gaussian, Uniform Random](https://www.guru99.com/timers-jmeter.html)
- [Assertions in JMeter: Response Assertion with Examples](https://www.guru99.com/assertions-in-jmeter.html)
- [9 JMeter Alternatives (2026 Update)](https://www.guru99.com/jmeter-alternative.html)

## Module Controller

The goal of Module Controller is to add modularity to JMeter.

The general idea is that web applications consist of small units of functionality (i.e. Logon, Create Account, Logoff…). This functionality can be stored in Simple Controller as “modules”. Module Controller will choose which module needs to run.

[![Module Controller]()](https://www.guru99.com/images/ModuleControllerJMeter.png)

Consider the following scenario –

You want to simulate:

- 50 users **logging out**,
- 100 users **logging in**
- 30 users **search** [www.google.com](http://www.google.com/)

You can use JMeter to create 3 modules. Each module simulates each user activity: Login, Logout, and Search.

[![Module Controller]()](https://www.guru99.com/images/TestNewPlanJMeterController.png)

The Module controller chooses which module needs to run.

[![Module Controller]()](https://www.guru99.com/images/RunLoginModuleJMeter.png)

## Other Important Controllers

- **Interleave** Controller: picks up and makes **one** of user request run in **each** loop of the thread.
- **Runtime** Controller: controls **how long** its children are allowed to run.

For example, if you specified Runtime Controller 10 seconds, JMeter will run your test for 10 seconds.

[![Other Important Controllers]()](https://www.guru99.com/images/RunTimeControllerJMeter.png)

- **Transaction** Controller: measures the **overall time** taken to **finish** a test execution
- **Include** Controller: is designed to use an external test plan. This controller allows you to use multiple test plans in JMeter. See detail in [JMeter Performance Testing](https://www.guru99.com/jmeter-performance-testing.html).

## Loop Controller Example

This section shows you step-by-step instruction to add **Loop Controller** set to your current performance test plan.

The Loop Controller makes the samplers run as a certain number of times, in addition to the loop value you specified for the Thread Group. For example, if you

- Add one HTTP Request to a Loop Controller with a loop count 50
- Configure the Thread Group loop count to 2
- Then, JMeter will send a total of 50 \* 2 = 100 HTTP Requests.

This is the **roadmap** of this example:

[![Loop Controller Example]()](<https://www.guru99.com/images/RunTestPlanFlowForJMeter(1).png>)

## Step 1) Configuring Thread Group

We **re-use** the Step 1, 2 in tutorial [JMeter Performance Testing](https://www.guru99.com/jmeter-performance-testing.html).

1. ### Add Thread Group

Right click on the [ Test Plan](https://www.guru99.com/test-planning.html) and add a new thread group: **Add**-> **Threads (Users)** ->**Thread Group**

But in Thread Group control panel, enter Thread Properties as follows:

[![Add Thread Group]()](https://www.guru99.com/images/ThreadPropertyForJMeter.png)

It will make **one** user request to the web server google.com and run it **2** times.

2. ### Add JMeter elements

Add HTTP request default to www.google.com.

3. ### Adding Loop Controller

Right Click Thread Group -> Logic Controller -> Loop Controller

[![Adding Loop Controller]()](https://www.guru99.com/images/AddingLoopControllerJMeter.png)

## Step 2) Configuring Loop Controller

Add value 50 to Loop Count field as below figure. It will make **one** user request to the web server [google.com](http://www.google.com/) run it **50** times, in addition to the loop value =2, you specified for the Thread Group above.So JMeter will send a total of **2 \* 50 = 100** HTTP Requests.

[![Configuring Loop Controller]()](<https://www.guru99.com/images/ConfiguringLoopController(1).png>)

Right click Loop Controller, Add -> Sampler -> HTTP request

[![Configuring Loop Controller]()](https://www.guru99.com/images/AddSamplerHTTPRequest.png)

## Step 3) Add View Results in Table

We re-use Step 2 in [Timer](https://www.guru99.com/timers-jmeter.html) to add View Results in Table

So the test plan is shown in below figure

[![Add View Results in Table]()](https://www.guru99.com/images/ViewResultInTableJMeterController.png)

## Step 4) Run your test

Now return View Results in Table, click Start button on the Menu bar (Ctrl+R) to run a test

As shown in the figure below, JMeter simulates **one user request,** which is sent 100 times, to the web server http://www.google.com/. The Test is stopped after a user request was sent in 100 times.

[![Run the Test]()](https://www.guru99.com/images/RunYourTestViewResultInTableController.png)

## Troubleshooting

1. If you face the issue while running the above scenario … do the following
2. Check whether you are connecting to the internet via a proxy. If yes, remove the proxy.
3. Open a new instance of Jmeter
4. Open the [ControllerTestPlan.jmx](https://drive.google.com/uc?export=download&id=0B_vqvT0ovzHcS255MmNOWldQaXc) in Jmeter
5. Click on Thread Group -> View Result in Table
6. Run the Test

## FAQs

🆚 What is the difference between a controller and a sampler in JMeter?

A sampler sends an actual request to the server, such as an HTTP or JDBC request. A logic controller does not send requests itself; it controls the order and conditions under which its child samplers run within a thread.

⏱️ What is the Transaction Controller used for in JMeter?

The Transaction Controller measures the total time taken to complete a group of samplers as a single transaction. It is useful for timing a multi-step business process, such as login then search, rather than each request separately.

🔢 How do the Loop Controller and Thread Group loop count combine?

They multiply. If a Loop Controller is set to 50 and the Thread Group loop count is 2, each sampler inside the controller runs 50 times per iteration, for a total of 50 times 2, which is 100 requests.

🤖 Can AI help design JMeter performance tests?

Yes. AI can suggest realistic workload models, generate test data, and analyze result graphs to flag bottlenecks. Machine learning detects performance anomalies and predicts capacity, helping engineers design and interpret JMeter tests faster.

🧠 How is AI used in performance testing?

AI models expected load patterns, auto-tunes test parameters, and analyzes metrics to detect regressions and root causes. These intelligent features make performance testing more predictive, turning raw JMeter results into actionable capacity insights.

#### Summarize this post with:

ChatGPTPerplexityGrokGoogle AI

**Stay Updated on AI** **Get Weekly AI Skills, Trends, Actionable Advice.**

##### Sign up for the newsletter

Subscribe for Free

You have successfully subscribed.  
Please check your inbox.

![AI-Newsletter]() Chosen by over **350,000+** professionals

[Scroll to top](#wrapper)

×

Search for:

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://www.guru99.com/#organization","name":"Guru99","sameAs":["https://www.facebook.com/Guru99Official","https://twitter.com/guru99com"],"logo":{"@type":"ImageObject","@id":"https://www.guru99.com/#logo","url":"https://www.guru99.com/images/guru99-logo-v1-150x59.png","contentUrl":"https://www.guru99.com/images/guru99-logo-v1-150x59.png","caption":"Guru99","inLanguage":"en-US"}},{"@type":"WebSite","@id":"https://www.guru99.com/#website","url":"https://www.guru99.com","name":"Guru99","publisher":{"@id":"https://www.guru99.com/#organization"},"inLanguage":"en-US"},{"@type":"ImageObject","@id":"https://www.guru99.com/images/controllers-in-jmeter-1.png","url":"https://www.guru99.com/images/controllers-in-jmeter-1.png","width":"700","height":"250","caption":"Controllers in JMeter","inLanguage":"en-US"},{"@type":"BreadcrumbList","@id":"https://www.guru99.com/controllers-in-jmeter.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":"1","item":{"@id":"https://www.guru99.com","name":"Home"}},{"@type":"ListItem","position":"2","item":{"@id":"https://www.guru99.com/jmeter","name":"JMeter"}},{"@type":"ListItem","position":"3","item":{"@id":"https://www.guru99.com/controllers-in-jmeter.html","name":"Controllers in JMeter: Loop, Logic, Transaction"}}]},{"@type":"WebPage","@id":"https://www.guru99.com/controllers-in-jmeter.html#webpage","url":"https://www.guru99.com/controllers-in-jmeter.html","name":"Controllers in JMeter: Loop, Logic, Transaction","dateModified":"2026-10-10T17:28:09+05:30","isPartOf":{"@id":"https://www.guru99.com/#website"},"primaryImageOfPage":{"@id":"https://www.guru99.com/images/controllers-in-jmeter-1.png"},"inLanguage":"en-US","breadcrumb":{"@id":"https://www.guru99.com/controllers-in-jmeter.html#breadcrumb"}},{"@type":"Person","@id":"https://www.guru99.com/author/editorial","name":"Editorial Team","url":"https://www.guru99.com/author/editorial","image":{"@type":"ImageObject","@id":"https://www.guru99.com/images/favicon-new-logo.png","url":"https://www.guru99.com/images/favicon-new-logo.png","caption":"Editorial Team","inLanguage":"en-US"},"sameAs":["https://www.guru99.com/editorial-team"],"worksFor":{"@id":"https://www.guru99.com/#organization"}},{"articleSection":"JMeter","headline":"Controllers in JMeter: Loop, Logic, Transaction","description":"If you want to control when to send a user request to a web server under test, what would you do?JMeter gives us a feature to do that.","keywords":"jmeter","speakable":{"@type":"SpeakableSpecification","cssSelector":[".entry-title",".summary"]},"@type":"Article","author":{"@id":"https://www.guru99.com/author/editorial","name":"Editorial Team"},"dateModified":"2026-10-10T17:28:09+05:30","image":{"@id":"https://www.guru99.com/images/controllers-in-jmeter-1.png"},"copyrightYear":"2026","name":"Controllers in JMeter: Loop, Logic, Transaction","subjectOf":[{"@type":"FAQPage","mainEntity":[{"@type":"Question","name":"What is the difference between a controller and a sampler in JMeter?","acceptedAnswer":{"@type":"Answer","text":"A sampler sends an actual request to the server, such as an HTTP or JDBC request. A logic controller does not send requests itself; it controls the order and conditions under which its child samplers run within a thread."}},{"@type":"Question","name":"What is the Transaction Controller used for in JMeter?","acceptedAnswer":{"@type":"Answer","text":"The Transaction Controller measures the total time taken to complete a group of samplers as a single transaction. It is useful for timing a multi-step business process, such as login then search, rather than each request separately."}},{"@type":"Question","name":"How do the Loop Controller and Thread Group loop count combine?","acceptedAnswer":{"@type":"Answer","text":"They multiply. If a Loop Controller is set to 50 and the Thread Group loop count is 2, each sampler inside the controller runs 50 times per iteration, for a total of 50 times 2, which is 100 requests."}},{"@type":"Question","name":"Can AI help design JMeter performance tests?","acceptedAnswer":{"@type":"Answer","text":"Yes. AI can suggest realistic workload models, generate test data, and analyze result graphs to flag bottlenecks. Machine learning detects performance anomalies and predicts capacity, helping engineers design and interpret JMeter tests faster."}},{"@type":"Question","name":"How is AI used in performance testing?","acceptedAnswer":{"@type":"Answer","text":"AI models expected load patterns, auto-tunes test parameters, and analyzes metrics to detect regressions and root causes. These intelligent features make performance testing more predictive, turning raw JMeter results into actionable capacity insights."}}]}],"@id":"https://www.guru99.com/controllers-in-jmeter.html#schema-1123838","isPartOf":{"@id":"https://www.guru99.com/controllers-in-jmeter.html#webpage"},"publisher":{"@id":"https://www.guru99.com/#organization"},"inLanguage":"en-US","mainEntityOfPage":{"@id":"https://www.guru99.com/controllers-in-jmeter.html#webpage"}}]}
```
