# uip rpa tm

> Syntax and options for `uip rpa tm`, which configures a Test Manager server connection and default project for an RPA project by writing its local .tmh/config.json.

`uip rpa tm` connects an RPA project to a Test Manager server and links a default project, entirely through local file I/O against `.tmh/config.json` in the project directory — no Studio or Helm instance is required for any verb here.

## Synopsis

```text
uip rpa tm connect --url <url>
uip rpa tm set-default-project --id <id> [--name <name>] [--key <key>]
uip rpa tm clear-default-project
uip rpa tm status
```

## uip rpa tm connect

Set the Test Manager server URL. Switching to a different server clears the previously-linked default project, since it belonged to the old server.

### Options

| Long | Value | Required | Description |
|---|---|---|---|
| `--url <url>` | absolute http(s) URL | **yes** | Test Manager server base URL, e.g. `https://cloud.uipath.com/<org>/<tenant>/testmanager_`. Must parse as an absolute URL with an `http`/`https` scheme — any other scheme (`mailto:`, `file:`, etc.) or an unparseable value fails client-side. |

### Example

```bash
uip rpa tm connect --url https://cloud.uipath.com/myorg/mytenant/testmanager_
```

### Data shape (--output json)

```json
{
  "message": "Test Manager server set to https://cloud.uipath.com/myorg/mytenant/testmanager_",
  "projectDir": "/work/MyProject",
  "configPath": "/work/MyProject/.tmh/config.json",
  "testManagerBasePath": "https://cloud.uipath.com/myorg/mytenant/testmanager_"
}
```

`clearedDefaultProject: true` is added when switching servers dropped a previously-linked default project. `reloadHint` is added when Studio needs a reload to pick up the change.

## uip rpa tm set-default-project

Link a Test Manager project as this RPA project's default. Requires a connected server (`tm connect`) first — setting a default project without one is rejected.

### Options

| Long | Value | Required | Description |
|---|---|---|---|
| `--id <id>` | string (GUID) | **yes** | Test Manager project id. |
| `--name <name>` | string | no | Project display name, stored alongside the id. |
| `--key <key>` | string | no | Project short code (e.g. `PROJ`), stored alongside the id. |

### Example

```bash
uip rpa tm set-default-project --id a1b2c3d4-0000-0000-0000-000000000001 --name "Invoice Automation" --key INV
```

### Data shape (--output json)

```json
{
  "message": "Default Test Manager project set to Invoice Automation",
  "projectDir": "/work/MyProject",
  "configPath": "/work/MyProject/.tmh/config.json",
  "defaultProject": { "id": "a1b2c3d4-0000-0000-0000-000000000001", "name": "Invoice Automation", "key": "INV" }
}
```

## uip rpa tm clear-default-project

Unlink the default Test Manager project. The server connection (`tm connect`) is left intact. Idempotent — succeeds even when no default project is currently set.

### Example

```bash
uip rpa tm clear-default-project
```

### Data shape (--output json)

```json
{
  "message": "Default Test Manager project unlinked.",
  "projectDir": "/work/MyProject",
  "configPath": "/work/MyProject/.tmh/config.json",
  "cleared": true
}
```

`cleared: false` and `message: "No default Test Manager project was set."` when there was nothing to clear.

## uip rpa tm status

Show the project's current Test Manager configuration — server URL and linked default project. Works whether or not `.tmh/config.json` exists yet.

### Example

```bash
uip rpa tm status
```

### Data shape (--output json)

```json
{
  "projectDir": "/work/MyProject",
  "configPath": "/work/MyProject/.tmh/config.json",
  "connected": true,
  "hasDefaultProject": true,
  "testManagerBasePath": "https://cloud.uipath.com/myorg/mytenant/testmanager_",
  "defaultProject": { "id": "a1b2c3d4-0000-0000-0000-000000000001", "name": "Invoice Automation", "key": "INV" }
}
```

## Related

- [RPA tool overview](./uip-rpa.md)
- [`uip rpa get-manual-test-cases`](./uip-rpa-get-manual-test-cases.md) / [`get-manual-test-steps`](./uip-rpa-get-manual-test-steps.md) — hidden, superseded by [`uip tm`](./uip-test-manager.md) for manual test case access; this `tm` group is a different, project-local config concern.

## See also

- [Global options](./global-options.md)
- [Exit codes](./exit-codes.md)
