
Prerequisites
Prerequisites
Before using the Playwright reporter, ensure you have:
- Node.js >= 18.0.0
- Playwright >= 1.40.0
- A Checkly account (sign up)
Install the Playwright Reporter
Install the Playwright reporter package via npm.Quick Start
1. Create an API key and get your Account ID
Authenticate the reporter with your Checkly Account ID and an API Key:- Log in to Checkly
- Get your Account ID from Account Settings > General
- Create an API key in User Settings > API Keys
CHECKLY_API_KEY and CHECKLY_ACCOUNT_ID environment variables.
2. Add the reporter to your Playwright configuration
playwright.config.ts
3. Run your tests
Configuration
Reporter Options
playwright.config.ts
| Option | Type | Default | Description |
|---|---|---|---|
outputDir | string | Playwright’s outputDir | Directory for output files |
sessionName | string | function | Auto-generated | Custom session name or function returning name |
dryRun | boolean | false | Skip upload, create local files only |
verbose | boolean | true | Forward worker stdout/stderr to the terminal |
debug | boolean | false | Enable debug logging |
showProgress | boolean | true | Display real-time test progress |
printSteps | boolean | false | Display individual test steps |
showSummaryTable | boolean | true | Display per-project results table |
scrubbing | boolean | object | See Secret Scrubbing | Control sensitive data removal from reports and traces |
outputDir):
checkly-report.json- JSON test reportcheckly-report.zip- ZIP archive with report and assets
Environment Variables
| Variable | Description |
|---|---|
CHECKLY_API_KEY | Your Checkly API key |
CHECKLY_ACCOUNT_ID | Your Checkly account ID |
CHECKLY_REPORTER_VERBOSE | Set to true for detailed debug output |
Secret Scrubbing
The reporter automatically removes sensitive values from reports, trace files, and logs before upload. Scrubbing is enabled by default.What Gets Scrubbed
| Category | What is redacted | Default behavior |
|---|---|---|
| Secret env vars | Values of environment variables you specify | Requires explicit envVars list |
| Auto-detected env vars | Values of env vars matching common patterns (SECRET, KEY, TOKEN, PASSWORD, CREDENTIAL, AUTH, PRIVATE, API) | Disabled by default; opt in with autoDetect: true |
| Prefixed env vars | Values of env vars starting with CHECKLY_SECRET_ | Enabled by default |
| Sensitive HTTP headers | Authorization, Cookie, Set-Cookie, Proxy-Authorization, X-API-Key, X-Auth-Token in network requests | Enabled by default |
Configuration
playwright.config.ts
| Option | Type | Default | Description |
|---|---|---|---|
envVars | string[] | [] | Env var names whose values should be scrubbed |
autoDetect | boolean | false | Auto-detect secrets from env vars matching common patterns |
prefix | string | false | 'CHECKLY_SECRET_' | Scrub env vars with this prefix; set false to disable |
sensitiveHeaders | string[] | false | Built-in list | Redact sensitive HTTP headers; pass an array for a custom list, or false to disable |
replacement | string | '*********' | Replacement text for scrubbed values |
Disabling Scrubbing
Disable all scrubbing:playwright.config.ts
playwright.config.ts
What Gets Uploaded
- Test results and status (passed/failed/flaky)
- Execution duration and timing
- Screenshots (on failure or explicit capture)
- Video recordings
- Playwright traces
- Console logs and network requests (extracted from traces)
- Git information (branch, commit, author) - automatically detected from CI or local git
Understanding Test Sessions
The reporter creates suite-level test sessions, not individual test file results. When you runnpx playwright test:
- One test session is created for the entire run
- All test results are grouped together
- All assets uploaded in a single ZIP file
Features
Real-time Test Progress
Shows test results as they run with status icons and error details. Similar to Playwright’slist reporter with Checkly integration.
Set showProgress: false when using another reporter for terminal output.
Summary Table
Displays a summary table with per-project breakdown of test results. SetshowSummaryTable: false to disable.
Multi-Provider Git Detection
Automatically detects git information (branch, commit, author) from:- GitHub Actions, GitLab CI, CircleCI, Travis CI
- Jenkins, Azure DevOps, Bitbucket Pipelines
- Local git repository (when running locally)
Test Step Code Snippets
Includes source code context in test step reports. View the exact line of code that executed with surrounding context for easier debugging.Dry Run Mode
Skip uploading to Checkly while still generating local files: Without credentials (automatic skip):dryRun option (explicit skip):
playwright.config.ts
playwright.config.ts
checkly-report.zip in your output directory for local inspection.
CI/CD Integration
- GitHub Actions
- GitLab CI
- CircleCI
- Go to your GitHub repository settings
- Navigate to Settings > Secrets and variables > Actions
- Add
CHECKLY_API_KEYas a repository secret - Add
CHECKLY_ACCOUNT_IDas a repository secret
Multiple Reporters
Combine with other Playwright reporters:playwright.config.ts
Troubleshooting
Missing traces or videos
Ensure yourplaywright.config.ts enables these features:
playwright.config.ts
Authentication errors
Verify your environment variables are set correctly:Upload failures
- Enable verbose logging with
verbose: trueorCHECKLY_REPORTER_VERBOSE=truefor detailed error messages - Verify your API key exists in Checkly API Keys settings