Skip to content

Playwright reporter settings

testPerchReporter(options) from @testperch/playwright returns an entry for Playwright’s reporter array.

Setting Meaning
url Required TestPerch origin. Use https://testperch.com for the hosted service.
apiKeyEnv Environment variable containing the project’s ingestion key. Defaults to TESTPERCH_API_KEY.
requestTimeoutMs Per-request timeout. Defaults to 20,000 ms for planning and events, and 10,000 ms for quarantine.
attachmentUploadTimeoutMs Upload timeout in milliseconds. Defaults to 30,000.
shardIndex, shardTotal Optional one-based shard position and total. Playwright’s native shard settings are detected automatically.
skipAiOptimization Set to true to bypass AI selection for this invocation. Reporting, quarantine, and failed-only retries still apply.
onlyRunFailedTestsForCiBuildRetries Set to false to disable failed-only retry filtering.

GitHub Actions supplies the build ID, attempt, branch, and commit automatically. Custom CI can pass ci, ciProvider, ciBuildId, attempt, branch, gitSha, and repositoryUrl explicitly. Attempt numbers start at one.

For PR runs, the reporter records the PR number and immediate target branch. For GitHub stacked PRs it also detects the stack base for environment matching. Custom CI can supply these as pullRequestNumber, pullRequestTargetBranch, and pullRequestStackBaseBranch.

The reporter reads an ingestion key from the environment when it runs. The public API uses separate credentials to read results or configure a project. See the published package README for the full list of reporter options.