Back to QMetry All Products Help Page
Insert a Repeat Block in Test Steps
QAS allows you to repeat blocks of code multiple times. You can repeat a set of steps as many times as you wish. Repeat Block held inside the script will loop a given amount of times, before allowing the script to continue.
Steps
1. Open the test case to view the recorded steps.
2. Select the step(s) that you want to repeat in the test script and open the Create drop-down at the top and select the Repeat Block option.
Alternatively, select the step(s) that you want to repeat in the test script and right click on the step and select the Repeat Block option.
The Repeat Block section opens with fields on it.
3. Enter the following details:
Name: Give name to the Repeat Block that is being added in the test script.
From - To: Mention the starting and ending range to specify the number of times you want to repeat the block. (for e.g. 0 to 10)
Increment By: Mention the number to increment by with each loop. (for e.g. 2. The loop will run 5 time for the defined range above.)
4. Click Create.
The selected steps for the Repeat Block are contracted into one.
You can also view the Repeat on hover over.