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
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.
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.
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.
In the Import OData Service from URL dialog box, click Advanced Settings.
In the lower part of the dialog, select the Use authentication settings option.
Provide the log-on credentials for the SAP HANA service.
Select the Use SAP HANA SAML option.
Click OK to import the service.
From the Local Activities section of the Toolbox pane, add a service method to the canvas.
In the Properties pane, select the General tab .
In the General tab, set the Use SAP SAML Authentication cell value to True or False.
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.