# Create test cases from a requirement

Navigate to aqua and open an existing requirement or create a new one. Once you finish editing it, save your item and click on the AI Copilot 'Test' button.

<figure><img src="https://3920520305-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FyZbW8vbNs5hz8x57emJJ%2Fuploads%2FiIwaa84y57WacH2xfNu6%2Fimage.png?alt=media&#x26;token=aa13a788-9833-40eb-a608-6350994af91c" alt=""><figcaption></figcaption></figure>

Once the modal appears, the requirement will be automatically linked.

<figure><img src="https://3920520305-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FyZbW8vbNs5hz8x57emJJ%2Fuploads%2Fso4rgEhBdjmchVt5xaz8%2Fimage.png?alt=media&#x26;token=428c51d4-53e9-4367-82d9-1e8c87f348bb" alt=""><figcaption></figcaption></figure>

You can also provide some context to AI Copilot, so it can better understand your project or specifics of the requirement and generate test cases taking into account added information. This includes, for instance, a glossary of words that are unique for your project or some important information about the product or device that is under the test.

<figure><img src="https://3920520305-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FyZbW8vbNs5hz8x57emJJ%2Fuploads%2FPf9dQcc8AV2hRcRJNch9%2Fimage.png?alt=media&#x26;token=844e7537-f1a9-4006-b91c-2cd488d4960d" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
If you want to generate a test case for a selected requirement based solely on a description or file, you can switch on the fly by simply selecting the desired option.
{% endhint %}

You can select whether AI Copilot should generate one or multiple test cases.

For a single test case, you can define paths: *positive* and *negative*. When you select multiple, AI will generate your test cases with positive and negative paths included.

When generating multiple test cases, you can preview created test cases and decide which should be kept and which should be discarded.

<figure><img src="https://3920520305-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FyZbW8vbNs5hz8x57emJJ%2Fuploads%2F0p0dYg4bl7Ef3QVZ42PC%2Fimage.png?alt=media&#x26;token=c50eb0bf-4147-4f71-b32f-b067d5a33841" alt=""><figcaption></figcaption></figure>

To preview a test case, click on the 'Eye' icon.

<figure><img src="https://3920520305-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FyZbW8vbNs5hz8x57emJJ%2Fuploads%2F5nGDKKNWjqyEwFA5A9Hb%2Fimage.png?alt=media&#x26;token=2049d874-0848-459f-ae16-479e0afeaf7a" alt=""><figcaption></figcaption></figure>

You can regenerate test cases too. Simplu click on the corresponding button and provide some additional instructions.

<figure><img src="https://3920520305-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FyZbW8vbNs5hz8x57emJJ%2Fuploads%2Fgiw6gvOu8zgTCEyYcNpk%2Fimage.png?alt=media&#x26;token=9a1a139b-68fa-4c95-92e8-8dbb9b521f55" alt=""><figcaption></figcaption></figure>

Here’s another neat trick. Once the AI Copilot generates a test based on requirement, it is immediately added as a dependency to the requirement. It will also be marked as covered. <br>

<figure><img src="https://3920520305-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FyZbW8vbNs5hz8x57emJJ%2Fuploads%2Fik7BHcBcIjaI5e97BuJ9%2Fimage.png?alt=media&#x26;token=b609e57e-4e54-4e47-873f-6b39ef540647" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
**Important Reminder:**

Please be aware that AI Copilot can occasionally make mistakes or provide inaccurate results. We strongly recommend verifying any crucial information for accuracy.
{% endhint %}


---

# 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.aqua-cloud.io/documentation/ai-copilot/ai-copilot-create-test-cases-out-of-requirements-or-based-on-context-in-seconds/create-test-cases-from-a-requirement.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.
