# Test Cases

Test cases help you verify that requirements are being met and track testing progress.

## What are Test Cases?

Test cases are structured tests that:

* Verify requirements are implemented correctly
* Document testing procedures
* Track pass/fail results over time
* Provide evidence of quality

## Viewing Test Cases

### All Test Cases

Navigate to **All Test Cases** to see test cases across all projects.

### Project Test Cases

* Open a project
* Go to **Requirements** tab
* View test cases linked to each requirement

### Test Case Details

Each test case shows:

* Title and description
* Steps to execute
* Expected result
* Linked requirements
* Execution history

## Creating Test Cases

{% stepper %}
{% step %}

### From a Requirement

* Open a requirement
* Click **+ Add Test Case**
* Fill in the details:
  * **Title** — What's being tested
  * **Steps** — How to execute the test
  * **Expected Result** — What should happen
  * **Preconditions** — What must be true before testing
* Click **Create**
  {% endstep %}

{% step %}

### Standalone Test Case

* Navigate to **All Test Cases**
* Click **+ New Test Case**
* Fill in details
* Link to requirements later
  {% endstep %}
  {% endstepper %}

## Test Case Properties

| Property            | Description              |
| ------------------- | ------------------------ |
| **Title**           | Brief name of the test   |
| **Description**     | What this test validates |
| **Steps**           | Step-by-step procedure   |
| **Expected Result** | What should happen       |
| **Preconditions**   | Required setup           |
| **Requirement**     | Linked requirement(s)    |
| **Status**          | Current execution status |

## Executing Tests

{% stepper %}
{% step %}

### Run a Test

* Open the test case
* Click **Execute**
* Follow the steps
  {% endstep %}

{% step %}

### Record the Result

Choose one of:

* **Pass** — Test succeeded
* **Fail** — Test failed
* **Blocked** — Could not execute
* **Skipped** — Intentionally not run
* Add notes about the execution
* Click **Save Result**
  {% endstep %}
  {% endstepper %}

## Test Execution History

{% stepper %}
{% step %}

* Open the test case
* Click **Execution History**
  {% endstep %}

{% step %}
You will see all previous runs including:

* Date and time
* Result (pass/fail)
* Who executed
* Notes
  {% endstep %}
  {% endstepper %}

## Linking Test Cases

{% stepper %}
{% step %}

### Link to Requirements

* Open the test case
* Click **Link Requirement**
* Select one or more requirements

The link appears on both records.
{% endstep %}

{% step %}

### Link to Issues

When a test fails:

* Open the test case
* Click **Link Issue**
* Create or select an issue

Track issue resolution from the linked issue.
{% endstep %}
{% endstepper %}

## Editing Test Cases

{% stepper %}
{% step %}

* Open the test case
* Click **Edit**
* Update any field

Changes save automatically.
{% endstep %}
{% endstepper %}

## Deleting Test Cases

{% stepper %}
{% step %}

* Open the test case
* Click **...** menu
* Select **Delete**
* Confirm deletion
  {% endstep %}
  {% endstepper %}

{% hint style="warning" %}
Note: Execution history is also deleted when a test case is deleted.
{% endhint %}

## Test Coverage

Track which requirements have tests:

* View requirements with/without test cases
* Identify gaps in test coverage
* Prioritize creating tests for critical requirements

## Best Practices

### Writing Test Cases

* Write clear, specific steps
* Include expected results for each step
* Document any preconditions
* Make tests repeatable

### Test Organization

* Create one test case per scenario
* Group related tests
* Link to relevant requirements

### Execution Tracking

* Execute tests regularly
* Record all results (even skipped)
* Note any issues encountered
* Update tests when procedures change
