> For the complete documentation index, see [llms.txt](https://docs.kaana.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.kaana.com/product/managing-projects/test-cases.md).

# 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


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://docs.kaana.com/product/managing-projects/test-cases.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
