> For the complete documentation index, see [llms.txt](https://docs.currents.dev/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.currents.dev/resources/reporters/currents-playwright/pwc-p/pwc-p-run.md).

# pwc-p run

`pwc-p run` starts orchestration and executes Playwright tests with load balancing across available workers. It distributes tests from the list produced by [`pwc-p discover`](/resources/reporters/currents-playwright/pwc-p/pwc-p-discover.md) for parallel execution.

## Examples

Run the full suite with orchestration:

```bash
npx pwc-p run --key <record-key> --project-id <project-id> --ci-build-id <ci-build-id>
```

Run tests from a discovery file (filtered earlier):

```bash
npx pwc-p discover --pwc-discovery-file tests.txt --grep @smoke
npx pwc-p run --key <record-key> --project-id <project-id> --ci-build-id <ci-build-id> --pwc-discovery-file tests.txt
```

Add Playwright runtime flags:

```bash
npx pwc-p run --key <record-key> --project-id <project-id> --ci-build-id <ci-build-id> -j 2 --timeout 10000
```

## Currents Configuration

These options configure how tests are recorded and reported in Currents.

### `--ci-build-id`

The unique identifier for a run. See [Configuration](/resources/reporters/currents-playwright/configuration.md#cibuildid).

### `-k, --key`

Your secret Record Key obtained from Currents. See [Configuration](/resources/reporters/currents-playwright/configuration.md#recordkey).

### `-p, --project-id`

The project ID for results reporting obtained from Currents. See [Configuration](/resources/reporters/currents-playwright/configuration.md#projectid).

### `-t, --tag`

Comma-separated tag(s) for recorded runs in Currents. See [Configuration](/resources/reporters/currents-playwright/configuration.md#tag).

### `--pwc-config <path>`

Path to currents config file `currents.config.[ts|js]`. See [Configuration](/resources/reporters/currents-playwright/configuration.md#configuration-sources).

## Discovery File

### `--pwc-discovery-file <path>`

Path to the discovery output file written by `pwc-p discover` and read by `pwc-p run`. Also available as `CURRENTS_DISCOVERY_FILE` environment variable or `orchestration.discoveryFile` in `currents.config.ts` (recommended for CI so both commands use the same path).

## Tag Handling

### `--pwc-remove-title-tags`

Remove tags from test names in Currents, e.g. `Test name @smoke` becomes `Test name` in the dashboard (default: false). See [Configuration](/resources/reporters/currents-playwright/configuration.md#removetitletags).

### `--pwc-disable-title-tags`

Disable parsing tags from test title, e.g. `Test name @smoke` would **not** have tag `smoke` in the dashboard (default: false). See [Configuration](/resources/reporters/currents-playwright/configuration.md#disabletitletags).

### `--pwc-disable-test-tags`

Prevent reporting tags defined in the test title or by test annotations (default: false). See [Configuration](/resources/reporters/currents-playwright/configuration.md#disabletesttags).

## Orchestration

### `--pwc-batch-size <auto|number>`

Defines how many Playwright workers are available for orchestration. See [/pages/EHsfSVxG1TmUz6UOD0WZ#orchestration.batchsize](https://docs.currents.dev/resources/reporters/currents-playwright/pwc-p/pages/EHsfSVxG1TmUz6UOD0WZ#orchestration.batchsize "mention").

### `--pwc-reset-signal <SIGUSR1|SIGUSR2>`

Specify a process signal to listen for to trigger a reset of the current in-progress tests. Only available on OS with POSIX signal support. See [/pages/EHsfSVxG1TmUz6UOD0WZ#orchestration.resetsignal](https://docs.currents.dev/resources/reporters/currents-playwright/pwc-p/pages/EHsfSVxG1TmUz6UOD0WZ#orchestration.resetsignal "mention").

### `--pwc-skip-reporter-injection`

Do not inject `@currents/playwright`. If set, you must add Currents reporter manually. See [/pages/EHsfSVxG1TmUz6UOD0WZ#orchestration.skipreporterinjection](https://docs.currents.dev/resources/reporters/currents-playwright/pwc-p/pages/EHsfSVxG1TmUz6UOD0WZ#orchestration.skipreporterinjection "mention").

### `--pwc-orchestration-id <string>`

Unique identifier of the orchestration session this run belongs to. See [Configuration](/resources/reporters/currents-playwright/configuration.md#orchestrationid).

### `--pwc-machine-id <string>`

Unique identifier of the machine running the tests. Mostly used internally. If not provided, it will be generated automatically. See [Configuration](/resources/reporters/currents-playwright/configuration.md#machineid).

### `--pwc-test-suite-file <path>`

Path to the full test suite file for orchestration and reporting. See [Configuration](/resources/reporters/currents-playwright/configuration.md#testsuitefile).

### `--pwc-cancel-after-failures <number | false>`

Abort the cloud run after the specified number of failed tests detected. Overrides the default Currents Project settings. See [Configuration](/resources/reporters/currents-playwright/configuration.md#cancelafterfailures).

## Debugging & Output

### `--pwc-debug [boolean | "remote" | "full"]`

Enable collecting debug logs for the reporter (default: false).

* `true` will print the debug logs to stdout
* `remote` will upload the debug logs to Currents servers
* `full` will print the logs to stdout and also upload to Currents

Environment variable: `CURRENTS_DEBUG=true | "remote" | "full"`. See [Troubleshooting](/guides/troubleshooting-playwright.md).

### `--pwc-output-file <path>`

File path for run summary output in JSON format. See [Configuration](/resources/reporters/currents-playwright/configuration.md#outputfile).

### `--pwc-console-output <preset>`

Reporter console output. See [Configuration](/resources/reporters/currents-playwright/configuration.md#consoleoutput).

### `--pwc-coverage <project-name>`

List of projects to collect coverage for, e.g. `--pwc-coverage chromium --pwc-coverage firefox`. If no projects are specified, coverage will be collected for all projects. See [/pages/EHsfSVxG1TmUz6UOD0WZ#coverage.projects](https://docs.currents.dev/resources/reporters/currents-playwright/pwc-p/pages/EHsfSVxG1TmUz6UOD0WZ#coverage.projects "mention").

### `--pwc-coverage-dir <path>`

Coverage reports directory path. See [/pages/EHsfSVxG1TmUz6UOD0WZ#coverage.dir](https://docs.currents.dev/resources/reporters/currents-playwright/pwc-p/pages/EHsfSVxG1TmUz6UOD0WZ#coverage.dir "mention").

## Runtime Flags

These flags are passed through to Playwright and control test execution:

### `-j, --workers <number>`

Number of parallel workers (Playwright passthrough). For example, `-j 2` runs tests with 2 workers.

### `--timeout <milliseconds>`

Test timeout in milliseconds (Playwright passthrough). For example, `--timeout 10000` sets a 10-second timeout.

See [Playwright CLI reference](https://playwright.dev/docs/test-cli#reference) for additional runtime flags.

## Help

### `-V, --version`

Show package version.

### `-h, --help`

Show help message.


---

# 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.currents.dev/resources/reporters/currents-playwright/pwc-p/pwc-p-run.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.
