For the complete documentation index, see llms.txt. This page is also available as Markdown.

Configuration

@currents/playwright configuration reference

Configuration Sources

@currents/playwright accepts configuration from the following sources:

  • ⭐️ Preferred: reading currents.config.ts file

  • Environment variables, e.g. CURRENTS_TAG=tagA,tagB

  • CLI command options, e.g. npx pwc ---tag tagA --tag tagB

  • Inline configuration in playwright.config.ts e.g. reporters: [currentsReporter(options)]

Configuration Overrides

Configuration values will resolve as follows:

  • environment variable value if exists, otherwise

  • corresponding CLI parameter value if exists, otherwise

  • value from playwright.config.ts if exists, otherwise

  • value from currents.config.ts if exists, otherwise

  • the default value, otherwise

  • throw if the value is mandatory

Example of using environment variables

Reference

ciBuildId *

  • Type: string

  • Default: undefined

  • Environment variable: CURRENTS_CI_BUILD_ID

Required. The ID of the build to associate the test run with. See CI Build ID.


projectId *

  • Type: string

  • Default: undefined

  • Environment variable: CURRENTS_PROJECT_ID

Required. The Currents project ID used for reporting. See Projects.


recordKey *

  • Type: string

  • Default: Required

  • Environment variable: CURRENTS_RECORD_KEY

Required. Secret key used to authenticate and upload results to Currents. See Record Key.


tag

  • Type: string[]

  • Default: []

  • Environment variable: CURRENTS_TAG=tagA,tagB

Tags added to the test run metadata. See Playwright Tags.


environment

  • Type: string

  • Default: undefined

  • Environment variable: CURRENTS_ENVIRONMENT

  • CLI option: --pwc-environment

  • Released in: 2.1.0

Run-level environment label (e.g. staging, production) attached to the recorded run for filtering and analytics. Override it per Playwright project with projects[].metadata.pwc.environment in playwright.config.ts. See Environments.


removeTitleTags

  • Type: boolean

  • Default: false

  • Environment variable: N/A

Remove inline tags like @smoke from test titles when processing test results on Currents servers. Helps to keep the test title consistent and keep test history when tags change.


disableTitleTags

  • Type: boolean

  • Default: false

  • Environment variable: CURRENTS_DISABLE_TITLE_TAGS

Prevent parsing tags like @smoke from test titles.


disableTestTags

  • Type: boolean

  • Default: false

  • Environment variable: CURRENTS_DISABLE_TEST_TAGS

Prevent reporting tags parsed from test title and the conventional Playwright Tags that appear in test definitions.


cancelAfterFailures

  • Type: number | false

  • Default: false

  • Environment variable: CURRENTS_CANCEL_AFTER_FAILURES

Stop the run after a number of failures. The number of failures is determined from all the results reported to the associated run (i.e. from multiple machines). Pass false to disable. See Failing Fast.


testSuiteFile

  • Type: string

  • Default: undefined

  • Environment variable: CURRENTS_TEST_SUITE_FILE

Full path to the test suite file used for orchestration and reporting. Mostly used internally.


machineId

  • Type: string

  • Default: CURRENTS_MACHINE_ID

  • Environment variable: N/A

Optional unique machine identifier. Mostly used internally.


orchestrationId

  • Type: string

  • Default: Auto-generated

  • Environment variable: CURRENTS_ORCHESTRATION_ID

Unique orchestration ID for the run. Mostly used internally.


outputFile

  • Type: string

  • Default: undefined

  • Environment variable: CURRENTS_OUTPUT_FILE

File path for the JSON output summary. The TypeScript definition of the contents is available:


ciUrl

  • Type: string

  • Default: undefined

  • Environment variable: CURRENTS_CI_URL

  • Released in: 2.1.3

Overrides or provides the CI job/run URL shown in the Run Details. By default Currents auto-detects the CI URL from your provider's environment variables (GitHub Actions, GitLab CI, CircleCI, Jenkins, etc.). Set this to override the auto-detected URL, or to supply one when auto-detection is unavailable (e.g. Docker containers, custom runners, or self-hosted CI).

Whitespace is automatically trimmed. If the value is empty or contains only whitespace, it is ignored.


consoleOutput

  • Type: none | summary | detailed

  • Default: detailed

  • Environment variable: CURRENTS_CONSOLE_OUTPUT

Reporter console output: "none" (no stdout), "summary" (intro, one line per test, summary), "detailed" (full per-test output).

The TypeScript definition of the configuration property is available:


orchestration

Set of configuration items related to Orchestration Setup.

orchestration.resetSignal

  • Type: SIGUSR1 | SIGUSR2

  • Default: undefined

  • Environment variable: N/A

Signal used to reset the tests running on the machine. See Cloud Spot Instances.

orchestration.skipReporterInjection

  • Type: boolean

  • Default: false

  • Environment variable: N/A

Prevents pwc-p from automatically configuring Playwright to use Currents reporter . If see, you must add Currents reporter manuall. See Orchestration Setup.

orchestration.onFinish

  • Type: (status: OrchestrationStatus) => Promise<void>

  • Default: undefined

  • Environment variable: N/A

Optional async callback called after orchestration completes. The callback runs on each machine that is part of an orchestrated run. The parameter status contains aggregated results from all the participating machines. The TypeScript definition of the contents is available:

orchestration.batchSize

  • Type: "auto" | number

  • Default: auto

  • Environment variable: CURRENTS_BATCH_SIZE

  • Released in: 1.13.0

Sets the batch size for orchestration. Batch size defines how many parallel lanes the orchestrator fills per machine.

  • auto infers the batch size from Playwright workers.

  • number explicitly sets the batch size, must be greater than 0

Defining this variable will override any project-level batch size/workers definition in playwright.config.ts (workers, currentsBatchSize per project). Available on @currents/playwright starting at version 1.14.0.

orchestration.createTimeoutMs

  • Type: number

  • Default: 60000 (60 seconds)

  • Environment variable: CURRENTS_OR8N_CREATE_TIMEOUT_MS

  • Released in: 2.5.0

Milliseconds to wait for orchestration session creation during pwc-p run. This timeout covers the discovery phase (playwright test --list) and Currents session creation.

For large test suites with thousands of spec files, the default 60-second timeout may be insufficient. Increase this value if you encounter Failed to start orchestration within 60000ms errors during orchestration startup.

Example:

This timeout only affects the initial orchestration session setup. It does not impact individual test execution timeouts or the orchestration.pendingChildExitTimeoutMs setting.

orchestration.pendingChildExitTimeoutMs

  • Type: number

  • Default: undefined

  • Environment variable: CURRENTS_OR8N_PENDING_CHILD_EXIT_TIMEOUT_MS

Maximum time (in milliseconds) to wait for pending Playwright child processes to exit after orchestration has finished. Once the timeout expires, the parent process sends SIGTERM to any remaining child processes. If a process is still running 5 seconds later, it is forcefully terminated with SIGKILL.

The orchestration session exits with:

  • 0 if all test results were successfully reported, even if some child processes had to be terminated after reporting completed.

  • 1 if any test results could not be reported, a task failed, or the run was cancelled.


coverage

Set of configuration items related to Code Coverage for Playwright.

coverage.projects

  • Type: boolean | string[]

  • Default: false

  • Environment variable: N/A

Enable or disable coverage collection for Playwright projects

  • true | []: enable for all projects

  • string[]: only enable for specified projects

  • false | undefined: disabled

coverage.dir

  • Type: string

  • Default: .nyc_output

  • Environment variable: N/A

Directory path for reading coverage reports. See Code Coverage for Playwright.

Last updated

Was this helpful?