Testing / Apache JMeter Interview questions
What is the difference between a Loop Controller and a While Controller?
A Loop Controller repeats the elements nested inside it a fixed, predetermined number of times, configured directly as a static count (or set to run based on the Thread Group's own loop count).
A While Controller instead repeats its nested elements for as long as a specified condition remains true, re-evaluating that condition after each iteration - it's suited to a repeat-until-some-runtime-condition-changes pattern rather than a simple, known-in-advance repeat count.
The practical difference is knowability: use a Loop Controller when you already know exactly how many times something should repeat, and a While Controller when the number of repetitions genuinely depends on runtime data, like a variable extracted from a response that changes as the test progresses.
More Related questions...
