> ## Documentation Index
> Fetch the complete documentation index at: https://docs.testdino.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Test Case Structure in TestDino

> Define test case structure in TestDino: add steps, custom fields, attachments, and view version history. Standardize test case format across your team.

A test case represents one functional check or validation in your system. It defines what to test, how to test it, and the expected result. Each test case includes metadata for classification, test steps for execution, and automation flags for tracking readiness.

<img src="https://tdstorageus.blob.core.windows.net/public/docs/_unlisted/test-management/test-case/structure/test-case-structure.webp" alt="Test Case Structure" />

## Quick Reference

| Section                                 | Details                                                     |
| :-------------------------------------- | :---------------------------------------------------------- |
| [Core fields](#core-fields)             | Title, description, key                                     |
| [Classification](#classification)       | Status, priority, severity, type, behavior, layer           |
| [Automation fields](#automation-fields) | Manual/Automated, flaky, muted                              |
| [Test steps](#test-steps)               | Classic (Action/Data/Expected) or Gherkin (Given/When/Then) |
| [Custom fields](#custom-fields)         | Text, textarea, number, dropdown, checkbox                  |
| [Attachments](#attachments)             | Screenshots, documents, test data files                     |
| [Version history](#version-history)     | Change tracking, comparison, restore                        |

## Core Fields

| Field           | Type            | Description                                            |
| :-------------- | :-------------- | :----------------------------------------------------- |
| **Title**       | Text (required) | The name of the test case                              |
| **Description** | Text            | A detailed explanation of what the test case validates |
| **Key (ID)**    | Auto-generated  | A unique identifier (e.g., TC-6297)                    |

## Classification

| Field        | Options                                                                                                 |
| :----------- | :------------------------------------------------------------------------------------------------------ |
| **Status**   | Active, Draft, Deprecated                                                                               |
| **Priority** | Critical, High, Medium, Low, Not Set                                                                    |
| **Severity** | Blocker, Critical, Major, Normal, Minor, Trivial, Not Set                                               |
| **Type**     | Functional, Smoke, Regression, Integration, E2E, API, Unit, Performance, Security, Accessibility, Other |
| **Behavior** | Positive, Negative, Destructive, Not Set                                                                |
| **Layer**    | E2E, API, Unit, Not Set                                                                                 |

## Automation Fields

| Field                 | Type     | Description                         |
| :-------------------- | :------- | :---------------------------------- |
| **Automation Status** | Dropdown | Manual, Automated                   |
| **Is Flaky**          | Checkbox | Mark an unreliable or unstable test |
| **Is Muted**          | Checkbox | Silence or skip this test           |

## Pre/Post-conditions

| Field              | Description                                       |
| :----------------- | :------------------------------------------------ |
| **Preconditions**  | What must be true before the test runs            |
| **Postconditions** | The expected system state after the test finishes |

## Test Steps

Test cases support one or more steps. Switch between **Classic** and **Gherkin** (BDD) formats using tabs in the step editor.

<Tabs>
  <Tab title="Classic">
    Classic steps use three fields per step:

    | Field               | Description            |
    | :------------------ | :--------------------- |
    | **Action**          | What action to perform |
    | **Test Data**       | Input data (optional)  |
    | **Expected Result** | What should happen     |

    Click **Add Step** to append additional steps.
  </Tab>

  <Tab title="Gherkin (BDD)">
    Gherkin steps use structured keywords for behavior-driven scenarios:

    | Keyword   | Purpose                                           |
    | :-------- | :------------------------------------------------ |
    | **Given** | Describe the initial context or precondition      |
    | **When**  | Describe the action or event                      |
    | **Then**  | Describe the expected outcome                     |
    | **And**   | Add additional conditions to Given, When, or Then |
    | **But**   | Add a negative condition or exception             |

    Each step maps to one keyword and its description.
  </Tab>
</Tabs>

## Tags

Add keyword tags (e.g., `smoke`, `regression`, `login`) for cross-suite categorization. Tags are comma-separated and can be applied during creation, editing, or bulk operations.

## Custom Fields

Create project-specific fields beyond the built-in set. Custom fields appear alongside standard fields in the creation form and editing sheet.

| Type         | Use for           | Example                                 |
| :----------- | :---------------- | :-------------------------------------- |
| **Text**     | Short information | Environment: "Staging", Build: "v2.1.5" |
| **Textarea** | Long notes        | Special instructions, test data details |
| **Number**   | Numeric data      | Execution time: `5` (minutes)           |
| **Dropdown** | Pick one option   | Browser: Chrome, Firefox, Safari, Edge  |
| **Checkbox** | Yes/No toggle     | Requires VPN: Yes / No                  |

### Custom Field Limits

| Limit                 | Value            |
| :-------------------- | :--------------- |
| Dropdown options      | 50 per field     |
| Text field length     | 500 characters   |
| Textarea field length | 5,000 characters |

<Callout icon="circle-info" color="#3B82F6">
  **Note**

  Manage custom fields in [Project Settings](/platform/project-settings). Unmapped columns during CSV import are automatically created as custom fields.
</Callout>

## Attachments

Attach screenshots, documents, or test data files to any test case. Attachments provide additional context for manual test execution or review.

| Detail                        | Value                  |
| :---------------------------- | :--------------------- |
| Max attachments per test case | 5 files                |
| Supported actions             | Upload, view, download |

<Callout icon="circle-info" color="#3B82F6">
  **Note**

  Attachments can be enabled or disabled at the project level in [Project Settings](/platform/project-settings).
</Callout>

## Version History

Track all changes made to a test case over time. Version history records who changed what and when, providing a full audit trail.

| Feature        | Description                              |
| :------------- | :--------------------------------------- |
| **Change log** | View a chronological list of all edits   |
| **Diff view**  | Compare any two versions side by side    |
| **Restore**    | Revert a test case to a previous version |

<Callout icon="circle-info" color="#3B82F6">
  **Note**

  Version history can be enabled or disabled at the project level in [Project Settings](/platform/project-settings).
</Callout>

## Metadata

| Field          | Description               |
| :------------- | :------------------------ |
| **Created by** | Author name and timestamp |

## Related

<CardGroup cols={2}>
  <Card title="Creating & Editing" icon="pen-to-square" href="/test-management/test-case/creating-editing">
    Create test cases using forms, quick entry, or suite menus
  </Card>

  <Card title="Organizing at Scale" icon="layer-group" href="/test-management/test-case/organizing-at-scale">
    Suites, tags, and bulk operations
  </Card>

  <Card title="Import & Export" icon="file-import" href="/test-management/import-export">
    Bulk import from CSV or TestRail
  </Card>

  <Card title="Project Settings" icon="gear" href="/platform/project-settings">
    Configure custom fields, attachments, and version history
  </Card>
</CardGroup>
