# uip tm

> Manage Test Manager projects, test cases, test sets, executions, schedules, defects, requirements, custom fields, labels, results, and attachments using the `uip tm` tool.

`uip tm` is the Test Manager tool: it manages test projects, test cases, test sets, executions, schedules, defects, requirements, results, reports, and attachments on a UiPath Test Manager tenant. Install it with `uip tools install tm`, or invoke `uip tm …` and let auto-install run. See [Tools (plugins)](./concepts-tools.md) for the install model and [uip tools](./uip-tools.md) for the command that manages tool installation.

`tm` is the command prefix — never `uip test-manager`. Use the `commandPrefix` column from `uip tools list` to confirm.

## Resources

Each resource has its own reference page. The verb set on each page matches the commands registered by `uip tm` — run `uip tm --help` to confirm the full surface on your installation.

| Resource | Purpose |
|---|---|
| [project](./uip-test-manager-project.md) | Create, list, update, delete Test Manager projects; get or set the tenant default project; set or clear the default Orchestrator folder; list owners; read and update project settings; export and import a project. |
| [project-permissions](./uip-test-manager-project-permissions.md) | Read the permissions you hold on a Test Manager project. |
| [migration](./uip-test-manager-migration.md) | Inspect and download the migration jobs behind `project export` and `project import`, and list or download migration schemas. |
| [testcases](./uip-test-manager-testcases.md) | Create, bulk-create, clone, list, get, update, delete, and export test cases; manage manual test steps and parameters; link or unlink Orchestrator automations; assign test cases to test sets statically or dynamically by label; list result history, test sets, requirements, packages, and Studio projects for a test case. |
| [pack](./uip-test-manager-pack.md) | Package an external Playwright test project into a `.nupkg` automation package, optionally auto-creating and linking its test cases. |
| [testsets](./uip-test-manager-testsets.md) | Create, clone, list, get, update, delete test sets; list contained test cases and dynamic assignments; set execution order, execution target, folder, and robot; read and update settings; assign a user; run a test set and return an execution ID. |
| [run](./uip-test-manager-run.md) | Run every test in a local RPA test project or in a package already uploaded to Orchestrator, wait for the results, and write a report; exits non-zero when a test fails. |
| [schedules](./uip-test-manager-schedules.md) | Create, list, update, enable, disable, and delete recurring test set schedules; list upcoming runs. |
| [executions](./uip-test-manager-executions.md) | List and filter executions; re-run an existing execution; retry the failed test cases of a finished execution; finish, cancel, delete, and export executions; set the reporting date; get aggregated stats. |
| [testcaselog](./uip-test-manager-testcaselog.md) | Start, finish, list, get, cancel, and assign test case logs; override a result; read assertions and robot logs. |
| [teststeplog](./uip-test-manager-teststeplog.md) | List the step-level execution log for a manual or mixed test case log. |
| [wait](./uip-test-manager-wait.md) | Poll a test execution until it reaches a terminal state; exits non-zero when a test failed, the run was cancelled, or the timeout elapsed. |
| [result](./uip-test-manager-result.md) | Download the results of a test execution as a JUnit XML report. |
| [report](./uip-test-manager-report.md) | Get a summary report (counts, pass rate, duration, failed cases) for a completed execution; export an execution report file. |
| [export-jobs](./uip-test-manager-export-jobs.md) | Check the asynchronous file export jobs that `testcases export` and `report export` start. |
| [attachment](./uip-test-manager-attachment.md) | Upload, list, get, update, delete, and download attachments (screenshots, logs, files) on Test Manager objects. |
| [defects](./uip-test-manager-defects.md) | Create, list, get, update, and delete defects raised from failed test results; read related objects, the linked external issue, and defect attachments. |
| [requirements](./uip-test-manager-requirements.md) | Create, list, get, update, delete, and export requirements; manage test case links; generate test cases from a requirement, evaluate requirements, and find obsolete test cases with AI. |
| [prompts](./uip-test-manager-prompts.md) | List, get, and create entries in the project prompt library that steers AI test generation and evaluation. |
| [customfield](./uip-test-manager-customfield.md) | Manage custom field definitions, their display labels, and allowed values. |
| [objectlabel](./uip-test-manager-objectlabel.md) | Add, remove, get, and list labels on Test Manager objects. |
| [user](./uip-test-manager-user.md) | Get profile information for the currently authenticated Test Manager user. |
| [perf-scenario](./uip-test-manager-perf-scenario.md) | Create, run, and delete performance scenarios (dry run or full load test); check performance testing licenses; see also [load-groups](./uip-test-manager-perf-scenario-load-groups.md), [execution data](./uip-test-manager-perf-scenario-execution-data.md), and [report](./uip-test-manager-perf-scenario-report.md). |

## Synopsis

```
uip tm <resource> <verb> [options]
```

Default output is `--output json`. All `uip tm` verbs honor the four [global options](./global-options.md) (`--output`, `--output-filter`, `--log-level`, `--log-file`).

Options that take a Test Manager enum value, such as `--status`, `--execution-type`, `--result`, and `--label-type`, match the value in any letter case. A value that one command prints, for example `Status: "Finished"`, can be passed to another command as `--status Finished`.

A request that Test Manager does not answer within 60 seconds fails with `ErrorCode: "network_error"` and `Retry: "RetryLater"`. The message names the request, which may still have been applied, so check the object before you repeat a change. File uploads have no such limit.

## Typical flow

Test Manager resources form a chain. A full CI run normally walks it end to end:

1. **project** — one-time setup. Create the project (or reuse an existing one), and optionally pin a default Orchestrator folder so later commands can omit `--folder-key`.
2. **testcases** — author test cases and link each one to an Orchestrator package entry point with `testcases link-automation`. This is the step that makes them runnable.
3. **testsets** — group test cases into an executable suite with `testsets create`.
4. **testsets run** — start a run. Returns an `ExecutionId` that every downstream command takes as input.
5. **wait** — block the script until the execution reaches a terminal state (`Finished` or `Cancelled`). Use `--timeout` to cap the wait. The exit code is `1` when a test failed or the run was cancelled.
6. **report / result / attachment** — after the run: a structured summary (`report get`), a JUnit XML file for CI test dashboards (`result download`), and any captured artifacts (`attachment download`).
7. **executions retry** — optional: if the run had failures that may be flaky, re-run only the failed test case logs in place.

For manual or mixed runs, the extended flow adds: **testcaselog start / finish** — mark individual test case logs as started and finished; and **teststeplog list** — retrieve step-level pass/fail detail. **requirements** links test cases to requirements for traceability reporting, `defects` tracks bugs raised from failed results, and **objectlabel** / **customfield** provide metadata management across all entity types.

For an existing Playwright test project, **pack** collapses steps 2 and 3 into one command: pointing it at the project root with `--project-key` packages the suite and auto-creates and auto-links matching test cases in a single call. A Playwright test case that pack created and linked must never be linked again with `testcases link-automation` — see [pack](./uip-test-manager-pack.md).

For a local RPA test project or a package already uploaded to Orchestrator, `run` collapses steps 2 through 6 into one command: `uip tm run --type package` runs every test case in the package, waits, writes a report, and exits non-zero when a test fails — see [run](./uip-test-manager-run.md). To run a test set on a recurring cadence instead of from a pipeline, create a schedule — see [schedules](./uip-test-manager-schedules.md).

The same flow works ad-hoc at a terminal: each verb prints a self-contained JSON envelope with the IDs the next step needs.

### Run without a project

If you run tests without specifying a project, Test Manager stores the results in the default project of your tenant. [`uip tm run --type package`](./uip-test-manager-run.md) does the same when you pass neither `--project-key` nor `--project-id`, and [`project get-default`](./uip-test-manager-project.md#uip-tm-project-get-default) shows which project that is. For more information, refer to [Default project for execution results](https://docs.uipath.com/test-manager/automation-cloud/latest/user-guide/tenant-level-settings#default-project-for-execution-results).

## Authentication and scope

Every `uip tm` verb resolves tenant and project context through the active session. Refer to [Authentication](./authentication.md) for sign-in. Project-scoped verbs take `--project-id` or `--project-key`. When you pass both, `--project-id` is used. Verbs that take an object key such as `--test-set-key DEMO:42` can also derive the project from the key's prefix.

An external application sign-in requires the scopes each verb needs. See [Scopes for uip tm](./uip-test-manager-scopes.md).

## Exit codes

Standard CLI [exit codes](./exit-codes.md) apply to every verb. Two verbs add domain-specific behavior:

- **`uip tm testsets run` followed by `uip tm wait`** — see [Exit codes on execution](./uip-test-manager-executions.md#exit-codes). `testsets run` exits `0` once the run is queued. `wait`, and `testsets run --wait`, exit `0` when the execution finished with no failed test, `1` when a test failed or the run was cancelled, and `4` on timeout, so a script can branch on each without parsing JSON.
- **`uip tm run`** — exits `1` when a test fails or reports no result, no test runs, or the run is cancelled, and `4` when `--timeout` elapses. See [run](./uip-test-manager-run.md).

## See also

- [Concepts: how UiPath CLI is organized](./concepts-cli-architecture.md)
- [Sessions](./concepts-sessions.md) — how tenant and project context are resolved.
- [Scripting patterns](./scripting-patterns.md) — exit-code branching and JSON filtering for CI.
- [Output formats](./output-formats.md) — JSON envelope and `--output-filter`.
