> For the complete documentation index, see [llms.txt](https://docs.mozark.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.mozark.ai/mcp/mozark-mcp-docs/guides/manage-test-cases-plans-and-runs.md).

# Manage test cases, plans, and runs

Manage TCM work through your AI assistant.

Everything you can do in Mozark's Test Case Manager (TCM) web UI, you can ask the assistant to do.

## Test cases

| You say                                         | Tool used                                 |
| ----------------------------------------------- | ----------------------------------------- |
| *"Show me TC-27."*                              | `tcm_get_test_case`                       |
| *"List test cases in this project."*            | `tcm_list_test_cases`                     |
| *"Find test cases about refund flows."*         | `search_test_cases` (semantic)            |
| *"Create a test case for … with these steps …"* | `tcm_create_test_case` (manual authoring) |
| *"Change TC-27's priority to High."*            | `tcm_patch_test_case`                     |
| *"Delete TC-30 and TC-31."*                     | `tcm_bulk_delete_test_cases`              |

{% hint style="info" %}
**Manual vs AI-generated.** `tcm_create_test_case` is for cases you dictate yourself. AI-generated drafts are saved with `save_test_cases` so they carry provenance tags. The assistant picks the right one automatically.
{% endhint %}

## Folders & requirements

> *"Create a folder called Payments and move TC-10 to TC-15 into it."*
>
> *"Add a requirement 'Users can pay with UPI' and link TC-12 to it."*

Tools: `tcm_create_folder`, `tcm_list_folders`, `tcm_get_folder`, `tcm_add_test_cases_to_folder`, `tcm_remove_test_cases_from_folder`, `tcm_create_requirement`, `tcm_list_requirements`, `tcm_update_requirement`.

## Test plans

Building a plan is a guided flow:

{% stepper %}
{% step %}

### List existing plans

The assistant lists existing plans.
{% endstep %}

{% step %}

### Propose cases

It asks Mozark's **Planner Agent** (`suggest_test_plan`) to propose cases for your release or sprint. If the planner needs more detail ("How many test cases?"), that question is relayed to you.
{% endstep %}

{% step %}

### Review matched test cases

You see the matched test cases.
{% endstep %}

{% step %}

### Choose where to add them

Choose: create a **new** plan or **add to** an existing one.
{% endstep %}

{% step %}

### Confirm changes

Nothing is created or changed until you confirm.
{% endstep %}
{% endstepper %}

> *"Build a regression plan for release 3.2 covering login, checkout and refunds."*

Tools: `tcm_list_test_plans`, `tcm_get_test_plan`, `tcm_create_test_plan`, `tcm_update_test_plan`, `tcm_add_test_cases_to_plan`, `tcm_remove_test_cases_from_plan`.

## Test runs

> *"Create a test run from the Release 3.2 plan and assign it to me."*
>
> *"What's the status of TR-8?"*
>
> *"Mark step 3 of TC-12 in TR-8 as failed."*

Runs can be executed **by hand** (you tell the assistant each step's result), or **on a real device** where the assistant drives the phone and records each step for you — see [Run tests on a real device](/mcp/mozark-mcp-docs/guides/run-tests-on-a-real-device.md).

Tools: `tcm_create_test_run`, `tcm_list_test_runs`, `tcm_get_test_run`, `tcm_patch_test_run`, `tcm_add_test_cases_to_run`, `tcm_test_run_start_testcase`, `tcm_test_run_set_step_status`, `tcm_test_run_add_evidence`, `tcm_test_run_finish_testcase`, `tcm_test_run_lock` / `unlock`.

## Bugs

> *"Log a High-severity bug 'Checkout crashes on coupon apply' linked to TC-12."*

Tools: `tcm_create_bug`, `tcm_list_bugs`, `tcm_get_bug`, `tcm_patch_bug`, `tcm_update_bug`, `tcm_delete_bug`, `tcm_bulk_delete_bugs`.

## Own-Cloud devices

If you execute on your own device fleet rather than Mozark's, register those devices so runs are still tracked:

> *"Register my Samsung S23 as a custom device for this project."*

Tools: `tcm_create_custom_device`, `tcm_list_custom_devices`, `tcm_execute_testcase_owncloud`.


---

# 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.mozark.ai/mcp/mozark-mcp-docs/guides/manage-test-cases-plans-and-runs.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
