# Nova AI Assertions

This Nova AI feature is designed to supports the creation of autonomous test assertions on API script. Once an user generate assertions for a script using this feature, they will be able to add directly assertions to respective script from the Nova AI. As of now its applicable for functional testing for REST APIs only.

## Contents

* [Nova AI Assertions](#nova-ai-assertions)
  * [To begin with Nova AI Assertion](#to-begin-with-nova-ai-assertion)
  * [Duplicate Assertions](#duplicate-assertions)
  * [Related Topics](#related-topics)

***

## To begin with Nova AI Assertion:

Step-1: Under projects, navigate to Functional Testing.

Step-2: Then under suite, below scripts listing table you will find Nova **AI icon**. Or inside script, click on **Generate test case** button.

![Icon](/files/vuC2NYXlxK4Fe9ZE2R64)

![Icon](/files/oSRbA16ql2IGqVKMBnTl)

Step-3: Then select a respective environment, and hit **Generate Test cases**.

![Icon](/files/n47xIXZ47YwXlIhfCIlD)

Step-4: Then select a respective environment, and hit **Generate Test cases**.

Step-5: You will be displayed with list of all assertions. Choose the desired one or select all. Then hit **Add & Save API**.

![Icon](/files/F2Sq6ooqTKT7ZrN0F3il)

Step-6: Then under **Assertion** tab, below respective assertions, it displays all the selected assertion with Nova icon.

![Icon](/files/akUYaH3B5yMsTqUlg9N7)

Step-7: Hit a **Run** button to execute API and check the result of assertions.

***

### Duplicate Assertions

* When we generate assertion from Nova and then select and click on **Add & Save**. Then, a **Duplicate Found** modal gets pop up, if a script is having same assertion.

  ![Icon](/files/Z3HYxzjg8LRTwJAfBvRV)
* Here can replace new value generated by Nova to actual assertion value by selecting **Replace** on dropdown.
* Or else, can delete Nova generated value and keep old one as it is, ny selecting **Delete New** on dropdown.

  ![Icon](/files/bYs8PDiTeD14UDkFla4e)
* Then hit an **Apply** button to see respective changes.

  ![Icon](/files/fpDxZwrMs3AtwBPhv06l)
* Under Header Assertion, content-type vlaue is replaced from application/json to application/xml
* Under JSON path Assertion, $.id vlaue is retain as it is since its opt for Delete New option on Duplicate Found Modal.

***

### Related topics

* [API To DB Assertion](/api-testing/functional-testing/api-to-db.md)
* [Parameterization](/api-testing/functional-testing/parameterization.md)
* [X-Ray](/api-testing/advanced-features/xray-integration.md)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.qyrus.com/api-testing/advanced-features/nova-api-assertions.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
