"LOOP" Command

Description: This command is used to loop from Start to End with Step used as an increment and stores a Variable.
Usage Scenario: Suppose we want to add users to the Blacklist on our Reference app by looping through the steps that block users one by one.

Procedure: Define a step with Loop command that runs 4 times (Start: 1 / End: 4 / Step: 1) and after the loop step, add the steps that perform blocking the user. Your steps will look like this:

*NOTE: The steps that perform blocking the users have been set to “Continue on Failure” which prevents them from failing the entire test case if the number of the users to be blacklisted is less than 4.

See the Test Library path: subject7_samples/subject7_advanced_suite/subject7_add_user_to_blacklist

The following video demonstrates how loop is used to add users to black list as part of execution of “subject7_add_user_to_blacklist” test case in “subject7_samples” folder: