Validate API Response Content: RESPONSE_VALIDATE_CONTENT
The Validate API Response Content command is used to validate whether a specific JSON value from a API response matches an expected value. This ensures that the API returns the expected content.
Example: Suppose you are testing an API that processes loan applications. After submitting a request, the API returns a response with a status field, and you need to verify that the status is “approved“.
Steps to Configure:
- Select Validate API Response Content from the Action dropdown.
- Leave the Screen Name field blank.
- In the Element Key field, enter the expected JSON value as a string (e.g., { “status”: “approved” }).
- In the Parameters section, enter the variable name that will store the validation result (e.g., ValidationResult).
- Click Save.
When executed, this command compares the expected JSON value with the actual API response.
Note: While the steps for adding an action command are identical in both views, the display of the steps changes:


Example Workflow:
The following screenshot illustrates how the Validate API Response Content command is structured within an API test case in HuLoop.

Expected Outcome on Execution:
- If the API response has { “status”: “approved” }, the ValidationResult variable stores true.
- If the response does not match, ValidationResult stores the differences between the expected and actual values for further analysis.
Notes:
- Ensure that the expected JSON value in the Element Key exactly matches the format of the API response, including proper syntax and structure.
- The API response should be from a previously completed call within the automation flow.