Highlighted
Respected Contributor.
Respected Contributor.
113 views

Unable to make API call using input parameters

Hi,

I have created one API service test using UFT one verion 15.01 by importing the WADL from file. After import i can see all the parameters under custom input/checkpoints section, but i'm unable to send the request by filling that section, rather i need to go to HTTP input/checkpoints section and to send the request by making below string and putting in the URL field.

https://api/Test/Notes/api/Notes?company=100&clientName=LLL&system=LSN&recordKey=BD800827&recordType=P&NoteType=675&showLogTimeStamp=N

In above string https://api/Test/Notes/api/Notes     is the request URL

So basically i am appending the input parameter with the request URL along with their values and then making the connection.

 

i'm using get method in above scenario.

Also, i'm unable to receive the response under, HTTP->Response body section, i had uploaded request JSON in that section, after which it was starting showing the response parameters, but the response data is not coming into those fields. 

All i am getting is response in 'Response body' field under 'Run Step Results' section.

Now, i wanted to check, if is this only the way to send and get the response from RestAPI ? because without sending the request and receiving the response in the fields it will be a very cumbersome process to design the framework around it.

Need to your suggestions. Thanks

-Binny

 

 

 

 

 

 

0 Likes
1 Reply
Highlighted
Micro Focus Frequent Contributor
Micro Focus Frequent Contributor

Hi,

You are saying UFT cannot send the request after importing the WADL, could you describe the behavior when running the API test? What error happened? 

UFT has a demo server called Flight API, you can open it first, import a WADL by using the url provided by the Flight API, then drag a method into the design panel. Try running the test and see the result.

About the response body region in the Body tab of the properties, it will not show the response body from the current run. You can run the test first, then click the Load from Replay button to load the response body format to the response body region. Then you can make another step link to the response body item. 

So if you want to get the current run response body, you need get it from the report.

Thanks,

Wenwen

 

 

0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.