Table of content

Simple Controller in JMeter

  • Simple Controller helps in organizing and storing the Samplers and other Logic Controllers. It doesn’t offer any other functionality like other controllers.

The Following Example Demonstrates the simple controller and Module controller:

  • Open the JMeter and then add Thread Group to the Default Test Plan.
  • In this example, I am using Blazedemo.com to explain the different scenarios.
  • Once you open the Blazedemo.com you will find multiple scenarios like Login, Registration, Flight Booking.
    blazedemo-application-jmeter
  • Next, go to the JMeter and then add HTTP sampler request to the Thread Group.
  • And then add blaze demo in the Server Name or IP and enter the Login path in the Path as shown below.
    login-request-for-blazedemo-jmeter
  • Add one more HTTP Request sampler and then add the Registration path in it as below.
    register-path-in-http-request-jmeter
  • Add one more HTTP Request and then add the Flight Booking path.
    flight-booking-request-jmeter
  • Add View Results Tree to see the Report and then save and run the Teat Plan.
  • All the requests have been executed. Due to the slow server problem sometimes you will receive an error while executing the results.
  • Now you can add a simple Controller to the Thread group and then add any Request under the Controller and Execute the Test Plan Once again.
  • Where the simple Controller does not make much difference, it is just like a container of requests and we can add multiple simple controllers in a single thread group.
    simple-controller-execution-jmeter
  • Once you create a simple controller request, you can execute multiple times whenever you want. And this can be possible by using the Modular Controller.
  • If we want to execute the Login Request multiple times before the Registration and the Flight Booking.
  • So we need to add Module Controller to the Thread group.
    add-module-controller-jmeter
  • As soon as we add a Module controller we need to disable the simple controller.
  • Right-click on the simple controller and then select the Disable option to disable the controller.
    disable-simple-controller-jmeter
  • Once you disable the Simple Controller, the Login Request won't execute.
    execute-test-plan-after-disabling-the-simple-controller
  • We need to call a simple Controller Request through Module Controller.
  • Add the Module controller for Flight Booking and then to the Registration request as below.
    module-controller-for-requests-jmeter
  • Now Save and run the TestPlan. The Login Request will be executed and then Flight Booking Request and then again the Login Request will be executed, then Registration request will be executed.
Comment / Suggestion Section
Point our Mistakes and Post Your Suggestions