Skip to main content

Add validations or extract values from API responses

Learn how to validate API calls for accurate and reliable tests.

Low Code Automation allows you to make API calls while recording your test which solves the complexity of automating test cases that involve dependencies beyond the web application UI. It enables users to integrate API calls directly into tests, facilitating scenarios as follows:

  • Initializing test environments
  • Invoking specific services
  • Checking backend conditions
  • Managing test data

Add API step

To add API requests in your tests, click on the icon from the recorder panel and select option Add API to configure an API.

Add API

You will see a response window to fill in the request details like API URL, Parameters, Authorisation, Header and Body.

Request Data

Request Component

Attributes Description
Method Select the HTTP method for the API call, including options like GET, POST, PUT, DELETE, or PATCH.
URL Specify the URL for the API endpoint.
Parameters Specify key-value fields for query parameters.
Authorization Select and apply the suitable authorization method (Basic, Bearer) for the API call.
Header Configure headers such as cookies, content-type, encoding, and language according to your API specifications.
Body Specify the data to send in one of the following formats:
- Form data or key-value fields - Raw

Import exisiting variable

Import an existing variable or link it to test dataset variable. Click on the + icon and select Local variables or Test dataset variables.

Local and test data variable

Validate or extract response details

Once you fill in the request fields and click send, the request is executed and a response is populated. The response contains the following:

  • Status
  • Response Headers
  • Response Body

Response Component

Validate response

  1. Expand the response section to add validations on status, headers or body.
  2. Hover over any value, and you will see the Validate option appear.
  3. Click Validate to add validation on the respective field.
  4. You can add multiple validations in a single API step.

Validate

Extract value from response

Click the Extract value option to store any response status, header or body value into a variable. This variable can then be imported in any of future steps.

Extract

You can either extract value or validate value. Switching from validation to extraction will remove existing validations.

API step execution

After test execution, a new See Details button appears, showing details about the API execution call.

Click this button to view the request, the generated response, along with the extracted variable values or validation results. If multiple validations were added, you will see results for all the passed and failed validations.

See details Validate

See details Variable

We're sorry to hear that. Please share your feedback so we can do better

Contact our Support team for immediate help while we work on improving our docs.

We're continuously improving our docs. We'd love to know what you liked






Thank you for your valuable feedback

Is this page helping you?

Yes
No

We're sorry to hear that. Please share your feedback so we can do better

Contact our Support team for immediate help while we work on improving our docs.

We're continuously improving our docs. We'd love to know what you liked






Thank you for your valuable feedback!

Talk to an Expert
Download Copy