Last updated on June 24th, 2025 at 04:56 am
This guide will show you how to use the JMeter Include Controller to modularize and reuse test scripts efficiently. You’ll learn how to reference external test plans, improve test organization, and manage complex performance testing scenarios using practical examples.
Include controller in jmeter is very useful if you wants to break your test plan in small fragments. There are many different jmeter controllers available. Each of them have different purpose as per it’s name. Jmeter include controller is useful to include external JMX file in your test. Means you can include external JMX file in your software load test plan using include controller in jmeter.
How to use include controller?
Let’s take simple example. You have 5 different load test scenario for your software web application and each needs login to software web application to perform next steps. That means you need to record login steps in all 5 scenario’s load test plan. So you are duplicating the common process steps in each test plan and it will increase test plan maintenance cost too. Include controller can help you in this situation.
Include controller in jmeter example
- Login
- My Account
- My Orders
- My Address
- Put Login request under Simple Controller.
- Right click on Simple Controller
- Select “Save as Test Fragment”.
- Give your desired name to test fragment and save it at your desired location. I have saved it with “Login module.jmx” at E:JMeter path.
Now create new software load test plan and
- Add Thread Group under Test Plan(Right click on Test Plan -> Add -> Threads -> Thread Group).
- Add Include Controller in jmeter under Thread Group(Right click on Thread Group -> Add -> Logic Controller -> Include Controller).
- In jmeter Include controller, Select “Login module.jmx” from E:JMeter as Filename using browse button as shown in bellow image.
- Add simple controller under Thread Group and add/record My Account, My Orders and My Address requests under it as shown in bellow image.
- Also add View Results Tree listener under Thread Group.
- First it will execute Test Fragment(Which contains login request) of Include Controller in jmeter and
- Then it will execute requests(My Account, My Orders and My Address requests) of simple controller as shown in bellow given image.
2 thoughts on “Jmeter Include Controller Example”
Simple and easy explanation! Thanks..
Thanks. It was a nice explanation.