> 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/test-and-quality-management/test-management/test-cases.md).

# Test Cases

A Test Case in Walnut is a structured validation unit designed to verify that an application behaves as expected. It defines a clear sequence of steps, associated objects, expected outcomes, and supporting test data to ensure functional accuracy and requirement compliance. This structured approach enables consistency, traceability, and reliable validation across the application.

In this module, you will learn how to create a test case, manage its test data effectively, build nested test cases, implement conditional workflows (such as If/Else and loops), execute test cases, and leverage AI Healing to automatically detect and resolve UI or object-level changes during execution.


---

# 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:

```
GET https://docs.walnutai.ai/test-and-quality-management/test-management/test-cases.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.
