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

# Writing Test Cases

A **Test Case** describes a specific scenario to be tested — what steps to take and what the expected outcome should be. This guide covers creating test cases manually and importing them in bulk via CSV.

***

## Before you start

Test cases are organised within **Modules**. Before creating a test case, make sure you have:

* A project created
* At least one module set up within that project

<Tip>
  Don't have a module yet? See [Modules & Tags](/qa/modules-and-tags) to set one up first.
</Tip>

***

## Creating a test case manually

### 1. Navigate to Test Cases

From the left sidebar, open your project and click **Test Management**. Select a module from the left panel, then click **Add Test Case**.

### 2. Fill in the test case details

<ParamField path="Title" type="text" required>
  A clear, descriptive name for the test case. Must be at least 3 characters.\
  Example: *"User can log in with valid credentials"*
</ParamField>

<ParamField path="Test Step" type="text" required>
  The steps a tester should follow to execute this test. Write each step on a new line for clarity.

  Example:

  ```text theme={null}
  1. Navigate to the login page
  2. Enter a valid email address
  3. Enter the correct password
  4. Click the Login button
  ```
</ParamField>

<ParamField path="Expected Outcome" type="text" required>
  What should happen when the test steps are completed successfully.\
  Example: *"User is redirected to the dashboard and sees a welcome message"*
</ParamField>

<ParamField path="Priority" type="select" required>
  The priority level of this test case. Options are fetched from your project settings.
</ParamField>

<ParamField path="Status" type="select" required>
  Controls visibility of the test case.

  * **Published** — visible and available for test runs (default)
  * **Draft** — work in progress, not yet ready for execution
</ParamField>

<ParamField path="Tag" type="select">
  Optional. Categorise your test case with a tag (e.g. `regression`, `smoke`, `api`, `ui`). Tags help you filter and group test cases for specific test runs.
</ParamField>

<ParamField path="Comment" type="text">
  Optional. Add any additional notes or context for testers running this test case.
</ParamField>

<ParamField path="Attachments" type="file">
  Optional. Attach supporting images (JPG or PNG only). Maximum 2 files, up to 100MB each.
</ParamField>

### 3. Save the test case

Click **Create**. You'll be returned to the test cases list where your new test case will appear.

***

## Importing test cases via CSV

If you have existing test cases in a spreadsheet, you can bulk import them using a CSV file.

### 1. Download the sample CSV

On the Test Cases page, click **Import Via CSV**, then click **Download Sample CSV** to get the template.

### 2. Prepare your CSV file

Your CSV must include the following columns:

| Column             | Required | Max Length | Notes                               |
| ------------------ | -------- | ---------- | ----------------------------------- |
| `title`            | Yes      | 500 chars  | Test case name                      |
| `teststep`         | Yes      | 1000 chars | Steps to execute                    |
| `expected_outcome` | Yes      | 500 chars  | Expected result                     |
| `priority`         | Yes      | 50 chars   | Must match a priority in the system |
| `comment`          | No       | —          | Additional notes                    |
| `tag`              | No       | —          | Tag name                            |

<Warning>
  Column headers are case-insensitive but must match exactly. The file must be saved as UTF-8 encoded CSV.
</Warning>

### 3. Upload and import

Drag and drop your CSV file onto the upload area, or click to browse. TMS ONE will validate each row before importing.

If any rows contain errors you'll see a summary showing:

* How many test cases were imported successfully
* How many failed and why (with row numbers)

Fix any errors in your CSV and re-upload to complete the import.

***

## Field reference

| Field            | Required | Default   | Notes                            |
| ---------------- | -------- | --------- | -------------------------------- |
| Title            | Yes      | —         | Min 3 characters                 |
| Test Step        | Yes      | —         | All steps in one field           |
| Expected Outcome | Yes      | —         | Cannot be blank                  |
| Priority         | Yes      | —         | Selected from dropdown           |
| Status           | Yes      | Published | Published or Draft               |
| Tag              | No       | —         | Optional categorisation          |
| Comment          | No       | —         | Additional notes                 |
| Attachments      | No       | —         | JPG/PNG, max 2 files, 100MB each |

***

## Tips for writing good test cases

<AccordionGroup>
  <Accordion title="Be specific with test steps">
    Avoid vague instructions like "check the login". Write exactly what the tester should do: which page to go to, what to enter, and what to click.
  </Accordion>

  <Accordion title="One scenario per test case">
    Each test case should test a single, specific scenario. Avoid combining multiple flows into one test case — it makes results harder to interpret.
  </Accordion>

  <Accordion title="Use Draft for work in progress">
    If a test case isn't ready yet, save it as **Draft**. It won't appear in test runs until you publish it.
  </Accordion>

  <Accordion title="Use tags consistently">
    Agree on a tagging convention with your team (e.g. `regression`, `smoke`, `api`) so you can easily filter test cases when creating test runs.
  </Accordion>
</AccordionGroup>

***

## What's next?

<CardGroup cols={2}>
  <Card title="Running Tests" icon="play" href="/qa/running-tests">
    Execute your test cases and track results
  </Card>

  <Card title="AI Test Generation" icon="robot" href="/po/ai-test-generation">
    Let AI generate test cases from acceptance criteria
  </Card>
</CardGroup>
