Call to API Test/Action Dialog Box

Relevant for: GUI tests only

This dialog box enables you to specify the test path, the context (entire test or specific action), and parameter values for a call to an API test or action.

To access
  1. Do one of the following:

    • Ensure that a GUI test or action is in focus in the document pane.
    • In the Solution Explorer, select a GUI test or action node.
  2. Do one of the following:

    • New call: Select Design > Call to Existing API Test/Action or click the Insert Call to New Action toolbar button and select Call to Existing API Test/Action.
    • Existing call: Right-click the step in the canvas or the editor and select Edit Call to API Test/Action.
Important information
  • If you double click on the call to the test or action in the External Tests node in the Solution Explorer, the test is opened in the document pane and added to the current solution.
  • Do not insert a call to an API test that contains a call to a GUI test, as this can cause unexpected behavior.

To see a demonstration of this functionality, go to the UFT Apps Marketplace page and select the Introduction to API Testing video.

See also

Running API Tests with GUI Tests

You enter the following to enable the call to the API test or action:

UI Elements

Description

Test path

The path to the API test to which you are inserting a call. You can insert a test path in any of the following ways:

  • browse to a test path
  • select a test path from the drop down list of recently called API tests
  • enter a test path manually

You can insert a relative or absolute test path.

Call to

The API test or action to which you are inserting a call. You can insert a call to:

  • the entire test
  • a specific action in the test
<Argument grid>

The list of arguments in the API test, including both input and output parameters. If an argument has a default value, that value is displayed in the Value column in the Keyword View of the action in which the test is called.

You can enter a constant value for each argument, or you can use parameter values from a data table, random number parameter, environment variable parameter, or a GUI test or action input parameter.

You insert a parameter value by clicking the parameterization button and specifying it in the Value Configuration Options Dialog Box.

Note:  

  • Parameter values are read-only in a Values cell. To modify a parameter value, click the X to clear the cell. Then enter a replacement value.
  • XML structures are not relevant for this option because they are not supported as argument types for API tests and actions.