Creating Repetition Logic for ActiveData in a Visual Test

Creating repetition logic for ActiveData allows a visual test to cycle through data in an ActiveData file and substitute the literal data in steps with the data in the ActiveData file.

When creating repetition logic for ActiveData in a visual test, you essentially define a sequential block of test steps that are used for ActiveData testing. Steps in the defined block that substitute literal data with data in an ActiveData file repeat during playback. The number of times the steps repeat is defined in the repetition logic, which can be all the rows in the ActiveData file or a subset of the rows.

Creating repetition logic for ActiveData in a visual test does not mean the visual test now uses ActiveData. This part of the process sets up steps in a test, but data in the steps themselves must be mapped to data in an ActiveData file.

  1. In the visual test, select the step that precedes the first step containing data to be substituted.
  2. Click Insert > Test Logic > Repetition. The Test Logic Designer wizard opens.
  3. If the General option to display wizard welcome screens is set to Yes, the Welcome page opens. Click Next to display the Select a Logic Type (Repetition) page.
    Tip: If the General option to display wizard welcome screens is set to No, the Select a Logic Type (Repetition) page appears as the first page of the Test Logic Designer wizard.
  4. In the Select a Logic Type (Repetition) page, select the Repeating a sequence of steps using data from an ActiveData file option and click Next. The Define the ActiveData asset to use page appears.
  5. Select the ActiveData asset that contains the data file to be used.
  6. Optional: From the Sheet name list, select the sheet to be used from the data file. By default, the sheet that is specified in the ActiveData asset is used.
  7. Specify the Start row and the End row to define which rows in the defined sheet will be used during the repetition. For additional information, see Determining Data Use for ActiveData.
  8. Select the corresponding option from the Random count radio list to define whether the repetition should go through all specified data rows sequentially or in random order, or through a specified number of repetitions with random data rows. For additional information, see Determining Data Use for ActiveData.
  9. Click Next.
    Tip: Use the Build the Repeat page to define the block of steps in the visual test that will repeat. Using the Build the Repeat page to define the repeating block of steps in a visual test is similar to using the Define ActiveData Area wizard pages to define a repeating block of code for a test script.
    The Build the Repeat page opens.
  10. Once the steps to repeat have been defined for the ActiveData repetition logic, click Next. The Summary page opens.
  11. Click Finish. Silk Test Workbench inserts the repetition logic steps before the first and after the last steps selected in the Build the Repeat page of the Test Logic Designer wizard. The step text for the inserted step that starts the repetition logic is as follows: Repeat using ActiveData '[ActiveData asset name]'

    The step text for the inserted step that ends the repetition logic is as follows: End Repeat