Data drive array checkpoints

Relevant for: API testing only

This task describes how to set checkpoints for elements of an array through data driving.

Enable active content on your computer

  1. In Internet Explorer, select Tools > Options.

  2. Select the Advanced tab.

  3. Enable the option Allow active content to run in files on My Computer in the Security section.

  4. Click OK and close the browser.

Back to top

Add a step with an array output

Add a test step with output properties in the form of an array.

Back to top

Data drive the array

  1. In the Properties pane, open the Input/Checkpoints tab .

  2. In the Checkpoints area, use the plus button . in the row of the parent node, to add an array element.

  3. Provide property values. These values are transferred to the Data pane during data driving. If you do not provide data, include the array element by selecting the triangle icon in the parent node.

  4. Select the array's parent node and click the Data Drive button .

  5. In the Data Driving Dialog Box, select Only Input, Checkpoints or Both Input and Checkpoints as a Data Driven Section option.

  6. Click OK. The data driving mechanism informs you that it succeeded.

Back to top

Set the evaluation expression

In the Properties pane, adjacent to the data driving expression, select an evaluation operator, such as = or <.

Back to top

Provide data for the array

  1. Once you data drive an array, you do not set property values from the Checkpoints pane. Instead, you edit the table in the Data pane. In the Data pane, click the node in the left pane, corresponding to the array element that is to be validated.

  2. In the <array_name> and MainDetails tables, enter the iteration number to which to checkpoint should be applied in the MainDetails column. A "1" indicates the first iteration. If you have several columns with "1" as the iteration number, the checkpoints will be validated against all of those values.

Back to top

Select an array validation method

In the Input/Checkpoints tab, expand the drop down adjacent to the name of the parent array node. Select one of the following:

Fixed. Checks that each of the returned array elements matches the corresponding array element in the data table in the Data pane. Each array is marked by an index number, as it checks the arrays by their index.
All. Checks that all of the returned array elements match the array element in the Data pane. In this mode, arrays are not marked by an index number. For example, if a property in the first array is marked >= 2 and the same property in another array element is set to <=10, the test run will check that all returned values are between 2 and 10.
Contains. Checks that at least one of the returned array elements matches the value of the property in the Checkpoints pane. In this mode, arrays are not marked by an index number.

Back to top

Set the number of iterations - optional

  1. Select the Test Flow or Loop box in the canvas.

  2. In the Properties pane, open the Input/Checkpoints tab.

  3. Set the number of iterations for the test run.

Back to top