-
Book Overview & Buying
-
Table Of Contents
-
Feedback & Rating

JMeter Cookbook
By :

Another variation of Loop Controllers you might sometimes encounter is the ForEach controller. These are a specialized form of controllers that loop through the values of a set of related values. The number of iteration execution is dynamically defined by the resolution of the related variables as opposed to a fixed number specified in loop controllers. This makes ForEach Controllers a good fit for use cases where you need to perform repetitive executions of samplers based on some information from the target application.
In this recipe, we will cover how to use ForEach controllers paginating through the posts of our sample application. This is going to be very similar to what was covered in the Using Loop Controller in test plans recipe, only this time, we will use the ForEach Controller to give you an idea of how it can be used to achieve a similar result. Perform the following steps:
Change the font size
Change margin width
Change background colour