Automate REST API Calls
abstract
As part of a test flow, we may need to call some webservice via REST APIs. The
REST API Call
Step in Flowcharts allows calling and verifying REST API calls.
- Click on the node where you need to add
REST API call
on the flowchart and selectAutomate
. Automate
dialog opens up with the selected node.- Click on the icon near to
Add Step
and from the drop-down selectREST API Call
- It opens a
REST API
dialog with the options to callGET
,POST
,PUT
,DELETE
,PATCH
- Choose relevant call, ex. GET and complete the fields like
URL
,Headers
, etc - Click
Get Response
to get the response of API - It will automatically navigate to the
Response
tab and show the response of the API. - Click on the
TREE
underBody
tab. - Click on the checkboxes for the values that need to be asserted or stored.
- Click on the
Update
to save the assertion. - Click on
Store
to store the value of the response in some variable. - Assertions can be seen on
Assertions
tab - Variables can be seen on
Variables
tab -
Click on
Update
button to add theAPI Call
in the Keyword. - Similarly, use
Post
or any other method.
info Select multiple checkboxes and use the
Assert
and Store
buttons to assert or store the values in one shot.