# Playwright test automation with the uipath-test skill (Preview)

> Bring an existing Playwright suite into UiPath Test Manager with the uipath-test skill, with no code changes required.

:::note
This feature is in Preview. Preview features are not supported for production use and may have limited functionality.
:::

The `uipath-test` skill lets a coding agent (Claude Code, Cursor, GitHub Copilot, Gemini CLI, or Codex) take an existing Playwright test suite, with no code changes, and bring it into UiPath Test Manager.

Ask your agent in plain language, and it creates the Test Manager project, packages the suite, uploads it to Orchestrator, auto-creates linked test cases, builds a test set, runs it, and reports pass, fail, and skip results.

When tests fail, you can ask the agent to fix them, repackage, republish, and re-run, entirely from the terminal. Without this skill, bringing an existing Playwright suite into Test Manager would otherwise require rewriting the tests as UiPath automations — this flow packages your Playwright code unchanged.

## Prerequisites

- UiPath CLI (`uip`) installed and authenticated (`uip login`). CLI version **1.200.0 or later** is required for the `--playwright-projects` flag used in this flow.
- UiPath skills installed for your coding agent (`uip skills install --agent <agent>`), which installs the `uipath-test` skill bundle.
- Playwright installed locally in the project you want to bring into Test Manager, installed with npm (a `package-lock.json` must be present). The skill packages your existing suite as-is and does not install Playwright for you.

## Bring your suite into Test Manager

1. Open your coding agent in your Playwright project's root folder.
2. Ask it to bring the suite into Test Manager:

   > "I have written some Playwright scripts to test my website [Product Name]. Can you help me run these tests using UiPath's Test Manager service?"

3. Answer the agent's setup questions on the first run: which Test Manager project the tests should land in (or whether to create a new one), and which Playwright scope (for example, `regression`, `smoke`, or `checkout-critical`) to execute first.
4. Review the pass, fail, and skip summary the agent reports, including which failures look like real assertion mismatches versus environment or infrastructure issues.

**Result:**

Behind the scenes, the agent creates the Test Manager project and its default Orchestrator execution folder, packages the Playwright project into a `.nupkg`, and uploads it to the Orchestrator package feed.

Test Manager auto-creates and auto-links one test case per discovered test. The agent then creates a test set scoped to the selected Playwright project, runs it, and polls until the execution finishes.

## Fix a failing test and re-run

Ask your agent to fix and re-run:

> "Fix the failing tests and re-run the smoke test set."

The agent fixes the failing test code, then repacks with a bumped package version, re-uploads, and re-runs the same test set. The Playwright project and scope selection persists on the test set, so you don't need to re-specify it.

:::warning
Don't ask the agent to use `uip tm executions retry` to re-run after a fix. That command re-runs the previous execution's failures against the **old** package version, the opposite of this loop. Instead, the agent bumps `--package-version`, repacks and re-uploads, then re-runs the same test set.
:::

## Command reference

The agent selects these commands automatically from your prompts — you don't need to type them yourself. They're useful for troubleshooting, or for scripting the same flow in CI.

| Step | Command |
|---|---|
| Create the Test Manager project | `uip tm project create --name "SwagLabs" --project-key SWAG --description "..." --output json` |
| Set the default execution folder | `uip tm project set-default-folder --project-key SWAG --folder-key <key> --output json` |
| Package the Playwright project | `uip tm pack --project-path . --type playwright --project-key SWAG --name SwagLabsPlaywright --package-version 1.0.0 -o .packages --output json` |
| Upload to Orchestrator | `uip or packages upload ".packages/SwagLabsPlaywright.1.0.0.nupkg" --output json` |
| Poll for ingested test cases | `uip tm testcases list --project-key SWAG --output json` |
| Run the test set, scoped to a Playwright project | `uip tm testsets run --test-set-key SWAG:37 --playwright-projects regression --output json` |
| Poll execution status and results | `uip tm report get --execution-id <id> --project-key SWAG --output json` |
| Pull failure details for triage | `uip tm executions testcaselogs list --execution-id <id> --project-key SWAG --only-failed --output json` |

:::note
`uip tm testcases list` takes no `--limit` flag.
:::

## See also

- [Tests](build-test.md) — the full list of what your coding agent can do with Test Manager.
- [`uip tm pack`](https://docs.uipath.com/uipath-cli/standalone/latest/user-guide/uip-test-manager-pack) — full reference for the packaging command used in this flow.
- [`uip tm testsets`](https://docs.uipath.com/uipath-cli/standalone/latest/user-guide/uip-test-manager-testsets) — full reference for `testsets run` and the `--playwright-projects` flag.
- [`uip or packages`](https://docs.uipath.com/uipath-cli/standalone/latest/user-guide/uip-orchestrator-packages) — full reference for publishing packages to Orchestrator.
