pwc-p discover
pwc-p discover command documentation - test discovery and filtering for Playwright orchestration
pwc-p discover runs Playwright test discovery and writes the test list to a file for use by pwc-p run during orchestration.
The discover command accepts Playwright filter flags to narrow down the test suite before orchestration. See the Playwright docs for complete filter flag documentation.
Examples
Discover all tests (no filters):
npx pwc-p discover --pwc-discovery-file tests.txtFilter tests by tag:
npx pwc-p discover --pwc-discovery-file tests.txt --grep @smokeDiscover only failed tests from the last run:
npx pwc-p discover --pwc-discovery-file tests.txt --last-failedDiscover tests from a specific project:
npx pwc-p discover --pwc-discovery-file tests.txt --project chromiumDiscover tests from specific spec files:
npx pwc-p discover --pwc-discovery-file tests.txt tests/auth.spec.ts tests/checkout.spec.tsOptions
--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).
--grep <pattern>
Filter tests by title using a regex pattern (Playwright passthrough). For example, --grep @smoke filters to tests with the @smoke tag.
--last-failed
Discover only tests that failed in the previous run (Playwright passthrough).
--project <name>
Filter tests by project name (Playwright passthrough). For example, --project chromium filters to tests configured for Chromium only.
Spec files
Specify test files or directories directly without a flag:
--pwc-config <path>
Path to the Currents config file: currents.config.ts, currents.config.js or currents.config.mjs. See Configuration Sources.
-V, --version
Show package version.
-h, --help
Show help message.
Last updated
Was this helpful?