> For the complete documentation index, see [llms.txt](https://docs.walnutai.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.walnutai.ai/core-features/intelligence-hub/generate-test-cases.md).

# Generate Test Cases

The **Generate Test Cases** section within the **Intelligence Hub** enables you to create structured and execution-ready test cases from multiple input sources within a unified workflow. Whether your testing inputs originate from **Smart Recording**, existing automation scripts, integrated tools, or connected code repositories, this module transforms them into well-defined and actionable test cases.&#x20;

By selecting **Generate Test Cases**, you can choose the appropriate source where you can initiate [**Smart Recording**](/core-features/intelligence-hub/generate-test-cases/smart-recording.md), import [**Automation Scripts**](/core-features/intelligence-hub/generate-test-cases/scripts-script-to-test-case-conversion.md), analyse a connected [**Code Repository**.](/core-features/intelligence-hub/generate-test-cases/code-repository-to-test-case.md) The system processes the selected input and converts it into structured test cases with&#x20;

* Test Steps: Organizes testing into logical, step-by-step actions
* Validations & Parameters: Adds relevant criteria and data inputs for accurate testing
* Visual Aids: Includes screenshots (where applicable) to improve clarity
* Test Coverage: Ensures complete testing by generating both positive and negative scenarios

You can also interact with the **Walnut AI Chatbot** to create, modify, refine, or enhance the generated test cases. This allows you to add additional scenarios, improve validations, optimize test steps, or regenerate improved versions before finalizing them.

It is mandatory to click **Save** to retain the generated test cases. If not saved, the generated test cases will not be retained and will no longer be available. Upon saving:

* Test Cases will appear under the **Test Case Module**.
* Steps, validations, parameters, and screenshots (if generated) will be reflected accordingly.

Additionally, you can **Download** the generated test case file for reference. If the file is no longer required, you may choose to **Delete** it. Please note that deleting a file is a permanent action and cannot be undone.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://docs.walnutai.ai/core-features/intelligence-hub/generate-test-cases.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
