Import a REST service model

UFT supports importing REST service model descriptions from WADL, Swagger, or OData REST APIs.

When you import service model descriptions, UFT automatically parses the service description and creates any relevant methods and resources.

Import the service

  1. In the toolbar, click the Add REST Service drop-down arrow and select one of the following:

    • Import Swagger Service from URL/File

    • Import OData Service from URL/File

    The Import WADL/Swagger/OData Service from URL/File dialog box opens.

  2. Do one of the following:

    When importing from a file In the Import dialog box, navigate to the JSON file (for Swagger services) or EDMX file (for OData services) that contains the service description.
    When importing from a URL In the Import Service from URL dialog box, enter the full URL to the file including the file name.

    UFT One parses the file for a few seconds, then adds the service's resources and methods to the Local Activities node in the Toolbox.

    If the schema you import is missing values for some elements, one of the following occurs:


    UFT One automatically generates the missing values.

    To do this it uses the values defined in the Autovalues pane of the Options dialog box (Tools > Options > API Testing tab > Autovalues pane).

    WADL/OData These values remain empty.

Back to top

Set authentication and response settings for an SAP HANA service

If you are importing an OData REST service model from a URL for an SAP HANA service, you must provide the log-on credentials as part of the import.

  1. In the Import OData Service from URL dialog box, click Advanced Settings.

  2. In the lower part of the dialog, select the Use authentication settings option.

  3. Provide the log-on credentials for the SAP HANA service.

  4. Select the Use SAP HANA SAML option.

  5. Click OK to import the service.

  6. From the Local Activities section of the Toolbox pane, add a service method to the canvas.

  7. In the Properties pane, select the General tab .

  8. In the General tab, set the Use SAP SAML Authentication cell value to True or False.

Back to top

Use the service's methods in your test

After you import the service model into UFT One, the methods are displayed in the Toolbox pane under the Local Activities node.

Add these methods to your test as needed.

Back to top