Book Image

JMeter Cookbook

By : Bayo Erinle
Book Image

JMeter Cookbook

By: Bayo Erinle

Overview of this book

Table of Contents (16 chapters)
JMeter Cookbook
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Using Interleave and Random Controller in test plans


When designing test plans, sometimes it is useful to simulate the random behavior of users. That is, not have all users in your test plan execute the same flow of events in the same manner. For example, in a typical e-commerce website selling products, it is not unusual to have potential consumers come and shop for different products. Some visit the site with the intention of buying, while some might have just visited the site to compare prices with a competing vendor. So, you could have Consumer A visit the site, browse around, put a few items in their cart, and then check out. Consumer B visits the site, just browses, not adding anything to their cart. As such, for this described scenario, we have two scenarios that we could interleave or randomly pick between.

JMeter provides two built-in controllers that allow us to do just that. These are Interleave and Random Controllers. These two controllers closely resemble each other in functionality...