Creating Repetition Logic for ActiveData Files

In visual tests, ActiveData typically involves repeating a series of steps, and substituting literal data for ActiveData for each repetition.

In this lesson, we will substitute the literal data that adds a customer to the database with data from the ActiveData file customers.csv, which contains ten customer records. For each repetition, data from a customer record in the ActiveData file will be used to enter data in the fields on the Create a New Account page of the InsuranceCo Web site.

  1. Make sure the AddAccount visual test displays in the Visual Navigator.
  2. Click Create Repetition Type Logic on the Silk Test Workbench toolbar. The Test Logic Designer wizard appears with the Welcome page displayed.
  3. Click Next. The Select a Logic Type page opens.
  4. Click Repeating a sequence of steps using data from an ActiveData file, and then click Next. The Define the ActiveData asset to use page opens.
  5. Since only one ActiveData asset (customers) has been associated with the visual test, it should appear in the ActiveData asset list. If not, select it from the list.
  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. In the Start row text box, leave the default value at 1.
  8. Check the End at last row containing data check box.
  9. Click Get all rows in sequence.

    You have now defined how the data file will be used in the repetition logic, and how many repetitions will occur.

    • The first row of the Active data file will be used first when the repetition logic executes.
    • The repeat will continue using each row until the last row is used.
    • Since all rows of data will be used in the repetition logic in sequential order and there are 10 rows of data in the ActiveData file, the steps to add a customer to the database will be repeated 10 times. For each repetition, a different row of customer data from the ActiveData file will be used as input.
  10. Click Next. The Build the Repeat page opens.

Now that you have defined how the ActiveData will be used, you are ready to determine the steps in the visual test that will be repeated.