Table of content

Loop Controller in Jmeter

  • Loop Controller will run the samplers/requests stored in it for the definite number of times or forever (if forever checkbox is selected).

Following Example demonstrates the Loop Controller :

  • Launch JMeter in your system.
  • Add Thread Group to the Test Plan and then add HTTP Request Sampler and entering the Website address in the HTTP Request as shown below.
    python-programming-jmeter
  • Create another one HTTP Request and then I am going to add UiPath Link as shown below.
    uipath-http-request-jmeter
  • In the same way, add one more HTTP Request and then add one more link in the path.
    git-http-request-jmeter
  • So I have Three HTTP Requests under the Thread Group. And also add one listener View Results Tree to see the report.
    add-view-result-tree-to-loop-controller-jmeter
  • Now save and run the Test Plan and after the execution, all the Requests have been executed successfully.
    run-loop-controller-requests-successfully-jmeter
  • Add the Loop controller to the thread group from the logic controller as shown below.
    add-loop-controller-jmeter
  • After adding the Loop controller to the thread group add the python programming request to it and enter the number of loop count as 3, so that the Python Programming will be executed three times and the remaining requests will be executed 1 time.
    add-loop-count-in-loop-controller-jmeter
  • Now save and run the test plan.
    loop-controller-executed-three-times-jmeter
  • So, Whatever the Loop count is present in the Thread Group is applicable to all the Requests and the loop count which is present in the Loop Controller will be applicable only to the Request which is present under the Loop controller.
Comment / Suggestion Section
Point our Mistakes and Post Your Suggestions