Use actions in an API test

Relevant for: API testing only

Create a new action

  1. Select Design > Call to New Action.

  2. Specify the action name and description. Click OK to add the call to the action to the canvas.

  3. In the Solution Explorer, double-click the action to open its canvas.

  4. Add steps to the action. Drag activities from the Toolbox onto the canvas.

    Note: You can insert a call to another action, from an existing action call.

  5. Back to top

Call an existing action or a test

  1. From the Toolbox pane, expand the HPE Automated Testing Tools node and add a Call API Action or Test or Call GUI Action or Test to the canvas.

  2. In the Properties Pane, Open the Input/Checkpoints tab .

  3. In the Input/Checkpoints tab, click the Select Action or Test button.

  4. Select the test and action and click OK.

Back to top

Set action properties

To set an action call's properties, you must set the values for each of the steps contained in the action separately.

  1. Select an activity within the action whose properties you want to set.

  2. In the Properties tab, provide values or data drive the properties.

  3. The property values that you set will be the default values used when you add a call.

    Note: If you reload the service using the Refresh button, the new version may add or remove properties. Properties that remain unchanged, will retain the default values.

  4. Back to top

Enable an action's data for editing when called by another test

To view or override an external action's data, you must expose it in its original location. This only applies to Excel type data sources, and only available for tests—not business components.

  1. Define data for the action that you will be calling. Assign the data manually or use data driving. For details, see Assign data to API test/component steps.

  2. In the Data Pane, select the data source's node.

  3. In the Properties pane, open the Data Source Properties tab and select the Allow other tools to override the data option. The Data pane creates a local copy of the data which can be edited.

Back to top

Override data from an action called by another test

  1. Make sure the action that you want to call has its data exposed.

  2. Open the test in which you want to add the call to the action.

  3. From the Toolbox pane, expand the HPE Automated Testing Tools node and add a Call API Action or Test or a Call GUI Action or Test activity onto the canvas.

  4. In the Input/Checkpoints tab in the Properties pane, click the Select Action or Test button.

  5. In the Select Action or Test dialog box, navigate to the test and select the desired action. Click OK.

  6. In the Data pane, select the data source node.

  7. In the Properties pane, open the Data Source Properties tab and select the Use a local, editable copy option.

  8. Edit the data tables in the Data pane.

Back to top