> 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/test-case-creation.md).

# 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

* 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.
  * **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.**

**WalnutAI 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.
* **From an Existing Test Case:**

  * Open any existing test case, select the test steps and click on '**Save as New Test Case'.** This allows you to quickly duplicate and modify existing test cases without starting from scratch.
