Advanced design using a loop

This OctoPerf tutorial guides you through the following steps:

  1. Use a Regex to extract a list of products,
  2. Use a FOREACH logic action to add one of each product to the shopping cart,
  3. Validate the Virtual User.

If you want to exercise with this tutorial, here is a JMX export of the resulting virtual user. This way you’ll be able to import it in OctoPerf as a JMeter script and compare to what you’ve done. You will also need this CSV file to make it work properly.

Notes:

As usual, more more details on the FOREACH logic action are available in our documentation. Also check out the WHILE logic action it allows more flexibility in certain contexts.