# Test Case Creation

**Steps to Create a New Test Case**

* Select '**Create New Test Case.**

<figure><img src="/files/jlXbJzz8CvRvvLxp7Gxk" alt=""><figcaption></figcaption></figure>

* Open **Test Case Information** and provide all necessary details, making sure all required fields are completed before moving forward.
  * **Test Case ID:** A unique, system-generated identifier used for tracking and referencing the test case across the project.
  * **Title:** Enter a concise name that clearly describes the functionality being validated; this is a mandatory field.
  * **Description:** Provide a detailed overview explaining the purpose of the test and its coverage.
  * **Objective:** Define the specific goal of the test and the exact behaviour you are verifying.
  * **Epic, Feature, & User Story:** Select these from the dropdowns to map the test case to its originating requirement, ensuring 100% traceability.
  * **Test Category & Type:** Categorize the test (e.g., Manual or Automation) and its functional area, such as Regression or UI.
  * **Priority:** Rank the importance of the test (Low, Medium, High, or Critical) to help the team prioritize execution.
  * **Status:** Track the current state of the test case, such as Draft, Reviewed, or Approved.
  * **Preconditions:** List any setup requirements as pre-requisites that must be met before the test begins, such as "User must be logged in".
  * **Expected Outcome:** State the successful result you expect to see once all steps are completed.

<figure><img src="/files/ki3J5iXdCraS5Tue3Egf" alt=""><figcaption></figcaption></figure>

#### Defining and Managing Steps&#x20;

* Use the **Add Step** option to add test steps. Define the step description and specify the expected result for each step.

<figure><img src="/files/aRPTa9vIZietqdKG4ZP9" alt=""><figcaption></figcaption></figure>

* Configure relevant **objects and parameters** wherever applicable.&#x20;
  * **Global Variables:** Type **`$(`** to access the dropdown for static, project-wide values.
  * **Runtime Variables:** Type **`$[`** to access the dropdown for dynamic values generated during execution.
  * **Local Variables:** Type **`${`** to open the dropdown for data specific to the current test case.
  * **Actions:** Alternatively, type **`/`** to open a comprehensive menu that includes objects, test case types, variables, and reusable actions.
* Click **Save** to save the test case.
* After saving, set up the required **test data.**

**Walnut provides multiple ways to generate test cases based on your workflow needs.**

* **From the** [**Intelligence Hub**](/core-features/intelligence-hub.md)**:** You can choose between two approaches:
  * **Requirement-Driven Path:** Generate a User Story first, then **Generate Test Cases** to maintain full traceability.
  * **Direct Generation Path:** Skip story creation and directly generate test cases from source documents or repositories for faster validation.
* **From the** [**Action Items Module**](/overview-and-tracking/action-item/ai-driven-requirement-enhancement-and-test-generation.md)**:** If requirements are already saved:
  * Open an existing User Story and use the **AI Generate** option.
  * A test case will be automatically created and linked to that story.


---

# 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.walnutai.ai/test-and-quality-management/test-management/test-cases/test-case-creation.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.
