For the complete documentation index, see llms.txt. This page is also available as Markdown.

Assertion Expression Builder

The Assertion expression builder simplifies the process of creating JSONPath expressions for API assertions. It allows you to navigate through the JSON body, select the required node or parameter, and generate the JSONPath expression, expected value, and match type.

To create JSON expression through assertion expression builder, perform the following actions:

  1. On the Home page, under Projects, select the required project.

  2. Select Design Studio > Test Case page.

  3. Select Test Case and create an API Test Step Group.

  4. Select @Assertion from Elements column.

Note: To know more about test step creation, click here.

  1. Select the JSONPath action.

  2. Select the Open assertion expression builder icon. The Assertion expression builder dialog opens.

  3. In the Response Body section, enter the JSON response body manually.

  4. From Select expected result node, select a node to generate the JSON expression.

  5. From the Match Type dropdown, select the required match type, such as Equal, Not Equal, or Regex.

  6. From Expected Result, select the value or node to fetch from the JSON response. The Expression is generated based on the selected Expected Result.

  7. Select Add.

Note: To create a conditional expression, use a filter expression and enter the required value manually in the Input Value column.

The Assertion expression builder adds the generated expected result and expression to the Input Value column in the required syntax format.

Last updated