Running TestSteps repeatedly - Repetitions

XTestSteps can be executed several times. TestSteps need to be inside a TestStep folder.

This function is not available for manual test execution.

  1. Select the TestStep folder in the details view and add the Repetition column via the Add or remove columns.

  2. Enter the number of repeats in the Repetition column. Repetitions can either be specified with integers >=0 or dynamic expressions.

    The folder icon changes as follows:

Alternatively, you can use the Repetition property in the Properties tab.

  1. Set the value of the setting Report Successful Execution of to TestStepValues - All so that your test results are shown on the TestStepValue level (see "Report Successful Execution of").

If you would like to repeat executions based on conditional statements, use loops as described in chapter "Using conditional statements and loops in TestCases".

A button is to be clicked repeatedly in the example below.

Button with simple counter

The ++ button should be clicked five times.

The ActionMode is set to Input.

TestCase entries

The ExecutionEntry shows the result for each repetition.

Results in the ExecutionEntry

Verify Repetition

You can verify the repetition of a parent loop folder or a specific loop directory.

  1. Use the expression {REPETITION} or {REPETITION[Repetition name]} in the Value column to verify the current number of repetitions set for the parent or a specific loop folder.

  2. Set The ActionMode to Verify.

This function is only available with Tosca TBox.

A button is to be clicked five times in the example below.

Button with simple counter

In the first TestStep, the ++ button should be clicked. The ActionMode is set to Input.

The next TestStep verifies the repetition that is currently set for the parent folder. The ActionMode is set to Verify.

The third TestStep verifies the repetition that is set for the Loop02 folder. The ActionMode Verify is used.

TestCase entries

The ExecutionEntry shows the result for each repetition.

Results in the ExecutionEntry