• info@helpingtesters.com
  • helpingtesters

Understanding JMeter Test Plan

September 10, 2017 JMeter Tutorial
JMeter Test Plan, JMeter Test Plan Example, JMeter Test Plan Template

As discussed in the previous blog – Understanding JMeter GUI regarding various components of JMeter User Interface. Now, we will be covering each component one by one. Firstly, we are going to understand – JMeter Test Plan. It is a placeholder of the entire test suite of JMeter. Whatever components we want to add in JMeter, they will be part of a Test Plan. 

 For one script there will only be one Test plan always. It is a unique entity of the script. Like other components of JMeter, multiple test plans cannot be added in the script. When JMeter GUI is launched, one can see Test plan on the left panel as a default component. It is blank by default and one can go on expanding it.

→Complete list of JMeter Tutorial Series

Various Components of a JMeter Test Plan

  • Thread Group
  • Logic controllers
  • Sampler
  • Assertions
  • Timers
  • Listeners
  • Configuration elements like HTTP Header manager, HTTP Cache Manager, CSV data config, User defined variables.

Above elements are not mandatory for every JMeter Test Plan. They are added based on whether a feature of the particular element is required for a test run or not. See steps to add various elements in -Understanding JMeter GUI.

Structure of a Basic JMeter Test Plan

  • Test Plan
    • HTTP Cookie Manager
    • HTTP Cache Manager
    • CSV Data Config
    • User Defined Variables
    • Thread Group
      • Logic Controller
        • HTTP Sampler
          • HTTP Header Manager
          • Assertions
        • Listener

Features of a JMeter Test Plan are as below

Name: Provide any meaningful name to a Test plan For example: “My First Test Plan”.

Comments: Any additional information related to Test plan can be added as comments.

User Defined Variables: These are variables that can be specified here and anywhere throughout the script.

  • Click on “Add” button, then you will see the first row highlighted. Double click under “Name” column to provide the name of the variable that you are creating.
  • Provide value of this variable under “Value” column.

This adds variables for the script. Multiple such variables can be added in the same manner. Test Plan can be created manually or by using Templates (File > Templates > Select Template).


Different Types of JMeter Test Plan

  • Web based Test plan
  • Web Service Test plan
  • FTP Test plan
  • SOAP Webservice Test plan
  • DataBase Test plan
  • Advanced Web Test Plan
  • LDAP Test plan

Creating Web based JMeter Test Plan

  • Launch JMeter in GUI Mode
  • The default view will show “TestPlan” and “WorkBench”.
  • Edit Name field of “Test Plan” to any meaningful name say “My First Web Based Test plan”
  • Right click on Test Plan > Add > Thread Group
  • Right click on Thread Group > Add > Config Elements > HTTP Cookie Manager
    • Cookie Manager is used to adding any cookie which is passed in the request
    • These are user defined cookies. 
  • Right click on Thread Group > Add > Config Elements > HTTP Header Manager
    • Headers can be added as part of “HTTP Header Manager”.
  • Right click on Thread Group > Add > Config Elements > HTTP Cache Manager
    • HTTP Cache Manager is added to clear cache on each iteration.
    • Select option: “Clear Cache each iteration?” To clear it.
    • The value in “Max number of elements in cache” may be increased or decreased.
  • After adding above config elements, right click on Thread Group > Add > Logic Controller > Simple Controller
  • After Controller is added, now we need to add requests in this so, right click on Simple Controller > Add > Sampler > HTTP Request for example https://en.wikipedia.org/wiki/Cheese
    • Change the Protocol based on whether the request is HTTP/HTTPs. It will be “https” based on above example.
    • Add Server name or IP: It is the server name of the application. Server Name will be “en.wikipedia.org” for above example.
    • Path : “/wiki/Cheese” (Using above example)
    • Port Number can be left blank.

  • After adding request, the listener can be added to see the request and response. For testing purpose, we add “View Results in a Tree”. Go to Test Plan > Add > Listener > “View Results in a Tree”.

  • In order to run. Click on green arrow and view results in the listener.


  • Now, Save the JMeter Test plan. Go to File > Save As > Give any meaningful name and hit “Save” button.

About the author

Ankita Dawar author

Ankita has worked on different types of testing like Manual, Automation, Performance testing.  She likes to learn about new tools in market that help to make testing easier and interesting. Testing is her passion due to versatile areas it offers.

Leave a Reply

Your email address will not be published.