What you’ll learn
- How to upload Playwright results from CircleCI using the
tdpwCLI - How to configure sharded test runs with merged reporting
tdpw CLI directly in your CircleCI config.
Prerequisites
Before setting up, ensure you have:- A TestDino account with a project created
- A TestDino API key (Generate API Keys)
- TestDino Example Repository for sample tests and ready-to-use CI configs
- A CircleCI account with access to your repository
- Playwright configured with JSON and HTML reporters in
playwright.config.js:
playwright.config.js
Set Up Your API Key
- Open your project in CircleCI
- Go to Project Settings → Environment Variables
- Click Add Environment Variable
- Set the name to
TESTDINO_TOKEN - Paste your TestDino API key as the value
- Save the variable
Basic Config
.circleci/config.yml
Upload Options
| Flag | Description | Default |
|---|---|---|
--environment <value> | Target environment tag (staging, production, qa) | unknown |
--tag <values> | Comma-separated run tags for categorization (max 5) | None |
--upload-images | Upload image attachments | false |
--upload-videos | Upload video attachments | false |
--upload-html | Upload HTML reports | false |
--upload-traces | Upload trace files | false |
--upload-files | Upload file attachments (.md, .pdf, .txt, .log) | false |
--upload-full-json | Upload all attachments | false |
--json | Output results as JSON to stdout (for CI/CD) | false |
-v, --verbose | Enable verbose logging | false |
Sharded Test Runs
For larger test suites, CircleCI parallelism splits tests across multiple containers. Each shard produces a blob report that needs to be merged before uploading.How it works
- CircleCI runs Playwright across 4 shards using
parallelism: 4 - Each shard saves its blob report to a workspace directory
- A separate
merge-and-uploadjob collects all blob reports, merges them, and uploads to TestDino - The merge job runs even if some shards fail
Full sharded config
.circleci/config.yml
Key details
| Config Block | What It Does |
|---|---|
parallelism: 4 | Runs 4 shard containers in parallel |
--shard=$((CIRCLE_NODE_INDEX + 1))/$CIRCLE_NODE_TOTAL | CircleCI uses 0-based indexing, Playwright uses 1-based |
set +e / exit 0 | Prevents shard failure from stopping blob report collection |
persist_to_workspace / attach_workspace | Passes blob reports from shards to the merge job |
requires: success, failed, canceled | Merge job runs regardless of shard outcomes |
Run Locally
Troubleshooting
Upload step skipped after test failure
Upload step skipped after test failure
Add
when: always to the upload step. For sharded runs, the merge-and-upload job must require the test job with success, failed, and canceled statuses.No report found at ./playwright-report
No report found at ./playwright-report
Verify your
playwright.config.js outputs to playwright-report/. For sharded runs, ensure persist_to_workspace includes blob and the merge step writes to playwright-report/.TESTDINO_TOKEN not found
TESTDINO_TOKEN not found
Confirm the environment variable is set in CircleCI → Project Settings → Environment Variables. Variable names are case-sensitive.
Sharded reports not merging correctly
Sharded reports not merging correctly
Next Steps
CI Optimization
Reduce CI time with smart reruns
Branch Mapping
Map branches to environments for organized test runs
Integrations
Connect Slack, Jira, Linear, Asana, and more
TestDino MCP
Access test results and fix issues with AI agents