{"id":11245,"date":"2024-12-11T03:41:10","date_gmt":"2024-12-11T08:41:10","guid":{"rendered":"https:\/\/www.redline13.com\/blog\/?p=11245"},"modified":"2024-12-11T03:47:01","modified_gmt":"2024-12-11T08:47:01","slug":"jmeter-loop-controller","status":"publish","type":"post","link":"https:\/\/www.redline13.com\/blog\/2024\/12\/jmeter-loop-controller\/","title":{"rendered":"The JMeter Loop Controller"},"content":{"rendered":"<p><strong><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-11246\" src=\"https:\/\/www.redline13.com\/blog\/wp-content\/uploads\/2024\/12\/word-image-11245-1.png\" alt=\"The JMeter Loop Controller\" width=\"400\" height=\"300\" srcset=\"https:\/\/www.redline13.com\/blog\/wp-content\/uploads\/2024\/12\/word-image-11245-1.png 400w, https:\/\/www.redline13.com\/blog\/wp-content\/uploads\/2024\/12\/word-image-11245-1-300x225.png 300w\" sizes=\"auto, (max-width: 400px) 100vw, 400px\" \/><\/strong><\/p>\n<p>Logical flow is an essential aspect of most performance tests. In previous posts we have explored conditional flow elements such as the <a href=\"https:\/\/www.redline13.com\/blog\/2024\/07\/using-the-jmeter-if-controller\/\" target=\"_blank\" rel=\"noopener\"><em>If Controller<\/em><\/a>, and deterministic test flow using <a href=\"https:\/\/www.redline13.com\/blog\/2023\/10\/jmeter-assertions-to-control-test-flow\/\" target=\"_blank\" rel=\"noopener\">Assertions<\/a>. In other cases, we may simply want to have control over running a repeating set of requests. The <a href=\"https:\/\/jmeter.apache.org\/usermanual\/component_reference.html#Loop_Controller\" target=\"_blank\" rel=\"noopener\"><em>JMeter Loop Controller<\/em><\/a> is a built-in component providing this functionality, which will iterate over a collection of elements and execute them a predetermined number of times. In this brief article, we will show you how to incorporate this simple but powerful component into your test plans.<\/p>\n<h3><a id=\"post-11245-_ixdmudfs97u7\"><\/a>Adding and Configuring the Loop Controller<\/h3>\n<p>As a built-in component of JMeter, the <em>Loop Controller<\/em> can be found under the standard list of Logic Controllers when adding elements to your test plan. We can specify a \u201c<em>Loop Count<\/em>\u201d parameter for this controller once it is added:<\/p>\n<figure id=\"attachment_11247\" class=\"wp-caption aligncenter\" style=\"max-width: 386px\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-11247\" src=\"https:\/\/www.redline13.com\/blog\/wp-content\/uploads\/2024\/12\/word-image-11245-2.png\" alt=\"Specifying a loop count for the JMeter Loop Controller\" width=\"386\" height=\"205\" srcset=\"https:\/\/www.redline13.com\/blog\/wp-content\/uploads\/2024\/12\/word-image-11245-2.png 386w, https:\/\/www.redline13.com\/blog\/wp-content\/uploads\/2024\/12\/word-image-11245-2-300x159.png 300w\" sizes=\"auto, (max-width: 386px) 100vw, 386px\" \/><figcaption class=\"wp-caption-text\">Specifying a loop count for the JMeter Loop Controller.<\/figcaption><\/figure>\n<p>Once added to your test plan, any number of child elements can be added underneath the <em>Loop Controller<\/em>. These contained elements will be executed in sequence, iterating over this list for as many times as specified for the loop count.<\/p>\n<figure id=\"attachment_11248\" class=\"wp-caption aligncenter\" style=\"max-width: 367px\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-11248\" src=\"https:\/\/www.redline13.com\/blog\/wp-content\/uploads\/2024\/12\/word-image-11245-3.png\" alt=\"Typical implementation of the JMeter Loop Controller with child elements\" width=\"367\" height=\"130\" srcset=\"https:\/\/www.redline13.com\/blog\/wp-content\/uploads\/2024\/12\/word-image-11245-3.png 367w, https:\/\/www.redline13.com\/blog\/wp-content\/uploads\/2024\/12\/word-image-11245-3-300x106.png 300w\" sizes=\"auto, (max-width: 367px) 100vw, 367px\" \/><figcaption class=\"wp-caption-text\">Typical implementation of the JMeter Loop Controller with child elements.<\/figcaption><\/figure>\n<p>It is worth mentioning that the loop count that is specified in the <em>Loop Controller<\/em> does <em>not<\/em> override any loop count setting that is specified in the parent <a href=\"https:\/\/jmeter.apache.org\/usermanual\/component_reference.html#Thread_Group\" target=\"_blank\" rel=\"noopener\">Thread Group<\/a>.\u00a0 The <em>Loop Controller<\/em> itself will be for run parent <em>Thread Group<\/em> iteration, acting in this case as a nested loop.<\/p>\n<hr \/>\n<p>Did you know that RedLine13 offers a full-featured, time limited free trial?\u00a0 <a href=\"https:\/\/www.redline13.com\/Service\" target=\"_blank\" rel=\"noopener\">Sign up now<\/a>, and start testing today!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Logical flow is an essential aspect of most performance tests. In previous posts we have explored conditional flow elements such as the If Controller, and deterministic test flow using Assertions. In other cases, we may simply want to have control over running a repeating set of requests. The JMeter Loop Controller is a built-in component providing this functionality, which will iterate over a collection of elements and execute them a predetermined number of times. In this<a class=\"more-link\" href=\"https:\/\/www.redline13.com\/blog\/2024\/12\/jmeter-loop-controller\/\">Read More &rarr;<\/a><\/p>\n","protected":false},"author":11,"featured_media":11246,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2],"tags":[75,128,283,299,318,735,424],"class_list":{"0":"entry","1":"post","2":"publish","3":"author-dkoziel","4":"post-11245","6":"format-standard","7":"has-post-thumbnail","8":"category-blog","9":"post_tag-apache-jmeter","10":"post_tag-cloud-load-testing","11":"post_tag-jmeter","12":"post_tag-jmeter-plugins","13":"post_tag-load-testing","14":"post_tag-loop-controller","15":"post_tag-redline13"},"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.12 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>The JMeter Loop Controller - RedLine13<\/title>\n<meta name=\"description\" content=\"In this brief article, we will show you how to incorporate the JMeter Loop Controller into your test plan.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.redline13.com\/blog\/2024\/12\/jmeter-loop-controller\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"The JMeter Loop Controller - RedLine13\" \/>\n<meta property=\"og:description\" content=\"In this brief article, we will show you how to incorporate the JMeter Loop Controller into your test plan.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.redline13.com\/blog\/2024\/12\/jmeter-loop-controller\/\" \/>\n<meta property=\"og:site_name\" content=\"RedLine13\" \/>\n<meta property=\"article:published_time\" content=\"2024-12-11T08:41:10+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-12-11T08:47:01+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.redline13.com\/blog\/wp-content\/uploads\/2024\/12\/word-image-11245-1.png\" \/>\n\t<meta property=\"og:image:width\" content=\"400\" \/>\n\t<meta property=\"og:image:height\" content=\"300\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"David Koziel\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"David Koziel\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.redline13.com\/blog\/2024\/12\/jmeter-loop-controller\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.redline13.com\/blog\/2024\/12\/jmeter-loop-controller\/\"},\"author\":{\"name\":\"David Koziel\",\"@id\":\"https:\/\/www.redline13.com\/blog\/#\/schema\/person\/51d282221e3230ab35f964f98ada9b20\"},\"headline\":\"The JMeter Loop Controller\",\"datePublished\":\"2024-12-11T08:41:10+00:00\",\"dateModified\":\"2024-12-11T08:47:01+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.redline13.com\/blog\/2024\/12\/jmeter-loop-controller\/\"},\"wordCount\":286,\"publisher\":{\"@id\":\"https:\/\/www.redline13.com\/blog\/#organization\"},\"keywords\":[\"apache jmeter\",\"Cloud Load Testing\",\"JMeter\",\"jmeter-plugins\",\"Load Testing\",\"Loop Controller\",\"RedLine13\"],\"articleSection\":[\"Blog\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.redline13.com\/blog\/2024\/12\/jmeter-loop-controller\/\",\"url\":\"https:\/\/www.redline13.com\/blog\/2024\/12\/jmeter-loop-controller\/\",\"name\":\"The JMeter Loop Controller - RedLine13\",\"isPartOf\":{\"@id\":\"https:\/\/www.redline13.com\/blog\/#website\"},\"datePublished\":\"2024-12-11T08:41:10+00:00\",\"dateModified\":\"2024-12-11T08:47:01+00:00\",\"description\":\"In this brief article, we will show you how to incorporate the JMeter Loop Controller into your test plan.\",\"breadcrumb\":{\"@id\":\"https:\/\/www.redline13.com\/blog\/2024\/12\/jmeter-loop-controller\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.redline13.com\/blog\/2024\/12\/jmeter-loop-controller\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.redline13.com\/blog\/2024\/12\/jmeter-loop-controller\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.redline13.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"The JMeter Loop Controller\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.redline13.com\/blog\/#website\",\"url\":\"https:\/\/www.redline13.com\/blog\/\",\"name\":\"RedLine13\",\"description\":\"(Almost) Free Load Testing in the Cloud\",\"publisher\":{\"@id\":\"https:\/\/www.redline13.com\/blog\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.redline13.com\/blog\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.redline13.com\/blog\/#organization\",\"name\":\"RedLine13\",\"url\":\"https:\/\/www.redline13.com\/blog\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.redline13.com\/blog\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/www.redline13.com\/blog\/wp-content\/uploads\/2013\/06\/cropped-rl13-header-logo.jpg\",\"contentUrl\":\"https:\/\/www.redline13.com\/blog\/wp-content\/uploads\/2013\/06\/cropped-rl13-header-logo.jpg\",\"width\":300,\"height\":68,\"caption\":\"RedLine13\"},\"image\":{\"@id\":\"https:\/\/www.redline13.com\/blog\/#\/schema\/logo\/image\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.redline13.com\/blog\/#\/schema\/person\/51d282221e3230ab35f964f98ada9b20\",\"name\":\"David Koziel\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.redline13.com\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/2babf644e0993fc86893c24d7525f1e3be114a8746c01249797f25587ae1697a?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/2babf644e0993fc86893c24d7525f1e3be114a8746c01249797f25587ae1697a?s=96&d=mm&r=g\",\"caption\":\"David Koziel\"},\"url\":\"https:\/\/www.redline13.com\/blog\/author\/dkoziel\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"The JMeter Loop Controller - RedLine13","description":"In this brief article, we will show you how to incorporate the JMeter Loop Controller into your test plan.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.redline13.com\/blog\/2024\/12\/jmeter-loop-controller\/","og_locale":"en_US","og_type":"article","og_title":"The JMeter Loop Controller - RedLine13","og_description":"In this brief article, we will show you how to incorporate the JMeter Loop Controller into your test plan.","og_url":"https:\/\/www.redline13.com\/blog\/2024\/12\/jmeter-loop-controller\/","og_site_name":"RedLine13","article_published_time":"2024-12-11T08:41:10+00:00","article_modified_time":"2024-12-11T08:47:01+00:00","og_image":[{"width":400,"height":300,"url":"https:\/\/www.redline13.com\/blog\/wp-content\/uploads\/2024\/12\/word-image-11245-1.png","type":"image\/png"}],"author":"David Koziel","twitter_card":"summary_large_image","twitter_misc":{"Written by":"David Koziel","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.redline13.com\/blog\/2024\/12\/jmeter-loop-controller\/#article","isPartOf":{"@id":"https:\/\/www.redline13.com\/blog\/2024\/12\/jmeter-loop-controller\/"},"author":{"name":"David Koziel","@id":"https:\/\/www.redline13.com\/blog\/#\/schema\/person\/51d282221e3230ab35f964f98ada9b20"},"headline":"The JMeter Loop Controller","datePublished":"2024-12-11T08:41:10+00:00","dateModified":"2024-12-11T08:47:01+00:00","mainEntityOfPage":{"@id":"https:\/\/www.redline13.com\/blog\/2024\/12\/jmeter-loop-controller\/"},"wordCount":286,"publisher":{"@id":"https:\/\/www.redline13.com\/blog\/#organization"},"keywords":["apache jmeter","Cloud Load Testing","JMeter","jmeter-plugins","Load Testing","Loop Controller","RedLine13"],"articleSection":["Blog"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/www.redline13.com\/blog\/2024\/12\/jmeter-loop-controller\/","url":"https:\/\/www.redline13.com\/blog\/2024\/12\/jmeter-loop-controller\/","name":"The JMeter Loop Controller - RedLine13","isPartOf":{"@id":"https:\/\/www.redline13.com\/blog\/#website"},"datePublished":"2024-12-11T08:41:10+00:00","dateModified":"2024-12-11T08:47:01+00:00","description":"In this brief article, we will show you how to incorporate the JMeter Loop Controller into your test plan.","breadcrumb":{"@id":"https:\/\/www.redline13.com\/blog\/2024\/12\/jmeter-loop-controller\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.redline13.com\/blog\/2024\/12\/jmeter-loop-controller\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.redline13.com\/blog\/2024\/12\/jmeter-loop-controller\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.redline13.com\/blog\/"},{"@type":"ListItem","position":2,"name":"The JMeter Loop Controller"}]},{"@type":"WebSite","@id":"https:\/\/www.redline13.com\/blog\/#website","url":"https:\/\/www.redline13.com\/blog\/","name":"RedLine13","description":"(Almost) Free Load Testing in the Cloud","publisher":{"@id":"https:\/\/www.redline13.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.redline13.com\/blog\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.redline13.com\/blog\/#organization","name":"RedLine13","url":"https:\/\/www.redline13.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.redline13.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/www.redline13.com\/blog\/wp-content\/uploads\/2013\/06\/cropped-rl13-header-logo.jpg","contentUrl":"https:\/\/www.redline13.com\/blog\/wp-content\/uploads\/2013\/06\/cropped-rl13-header-logo.jpg","width":300,"height":68,"caption":"RedLine13"},"image":{"@id":"https:\/\/www.redline13.com\/blog\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/www.redline13.com\/blog\/#\/schema\/person\/51d282221e3230ab35f964f98ada9b20","name":"David Koziel","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.redline13.com\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/2babf644e0993fc86893c24d7525f1e3be114a8746c01249797f25587ae1697a?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/2babf644e0993fc86893c24d7525f1e3be114a8746c01249797f25587ae1697a?s=96&d=mm&r=g","caption":"David Koziel"},"url":"https:\/\/www.redline13.com\/blog\/author\/dkoziel\/"}]}},"_links":{"self":[{"href":"https:\/\/www.redline13.com\/blog\/wp-json\/wp\/v2\/posts\/11245","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.redline13.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.redline13.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.redline13.com\/blog\/wp-json\/wp\/v2\/users\/11"}],"replies":[{"embeddable":true,"href":"https:\/\/www.redline13.com\/blog\/wp-json\/wp\/v2\/comments?post=11245"}],"version-history":[{"count":2,"href":"https:\/\/www.redline13.com\/blog\/wp-json\/wp\/v2\/posts\/11245\/revisions"}],"predecessor-version":[{"id":11251,"href":"https:\/\/www.redline13.com\/blog\/wp-json\/wp\/v2\/posts\/11245\/revisions\/11251"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.redline13.com\/blog\/wp-json\/wp\/v2\/media\/11246"}],"wp:attachment":[{"href":"https:\/\/www.redline13.com\/blog\/wp-json\/wp\/v2\/media?parent=11245"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.redline13.com\/blog\/wp-json\/wp\/v2\/categories?post=11245"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.redline13.com\/blog\/wp-json\/wp\/v2\/tags?post=11245"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}