Use this pre-built prompt to integrate tdpw into your project.
What you’ll learn
- Three commands:
upload,cache, andlast-failed - Upload options for HTML, images, videos, traces, and full bundles
- How to cache metadata and rerun only failed tests
tdpw uploads Playwright test reports to TestDino, caches test metadata for intelligent reruns, and retrieves previously failed tests for selective re-execution.
Prerequisites
- Node.js
>= 18.0.0 @playwright/test>= 1.52.0- TestDino API token (generate one)
- Git initialized repository (for commit and branch metadata)
- Playwright configured with JSON and HTML reporters:
playwright.config.js
Installation
Upload
Uploads Playwright test reports to TestDino with optional attachments.Upload Options
| Flag | Description | Default |
|---|---|---|
<report-directory> | Directory containing Playwright reports | Required |
-t, --token <value> | TestDino API token | Required |
--environment <value> | Target environment tag | unknown |
--tag <values> | Comma-separated test run tags (max 5) | None |
--upload-images | Upload image attachments | false |
--upload-videos | Upload video attachments | false |
--upload-html | Upload HTML reports with screenshots and traces | 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 for CI/CD pipelines | false |
-v, --verbose | Enable verbose logging | false |
Run Tags
Tags categorize entire test runs. Format: letters, numbers, hyphens, underscores, and dots only. Maximum 5 tags per run.JSON Output for CI/CD
Use--json to capture structured output in CI pipelines:
Cache
Stores test execution metadata after Playwright runs complete. This metadata enableslast-failed to identify which tests to rerun.
Cache Options
| Flag | Description | Default |
|---|---|---|
--working-dir <path> | Directory to scan for test results | Current directory |
--cache-id <value> | Custom cache ID override | Auto-detected |
-t, --token <value> | TestDino API token | Required |
-v, --verbose | Enable verbose logging | false |
Last Failed
Retrieves previously failed tests for selective reruns. Outputs test file paths that can be passed directly tonpx playwright test.
Last Failed Options
| Flag | Description | Default |
|---|---|---|
--cache-id <value> | Custom cache ID override | Auto-detected |
--branch <value> | Custom branch name override | Auto-detected |
--commit <value> | Custom commit hash override | Auto-detected |
-t, --token <value> | TestDino API token | Required |
-v, --verbose | Enable verbose logging | false |
Intelligent Rerun Workflow
Environment Variables
| Variable | Description |
|---|---|
TESTDINO_TOKEN | Authentication token |
TESTDINO_TARGET_ENV | Default environment tag |
TESTDINO_RUN_TAGS | Default comma-separated run tags |
What Gets Collected
| Category | Data |
|---|---|
| Git | Branch, commit hash, author, message, repository URL |
| CI | Provider, build ID, PR details |
| System | OS, CPU, memory, Node.js version |
| Playwright | Version, workers, projects, shard info |
| Artifacts | Screenshots, videos, traces, console output (when --upload-html or --upload-full-json used) |
| Annotations | testdino: annotations from test metadata (guide) |
Use in CI/CD
Thetdpw CLI works in any CI provider. Each guide below has full pipeline configs with sharding, merging, and troubleshooting.
GitHub Actions
GitLab
TeamCity
Azure DevOps
CircleCI
AWS CodeBuild
Jenkins
Troubleshooting
Token is required but not provided
Token is required but not provided
Verify the token is set:Pass it directly to confirm:Generate a new token from API Keys if the issue persists.
Execution limit reached
Execution limit reached
Your account reached its monthly quota. Tests continue to run normally. Only uploads to TestDino pause until the quota resets.Upgrade your plan or wait for the monthly reset.
report.json not found
report.json not found
Ensure your Playwright config includes the JSON reporter:Confirm the output directory matches the path passed to
tdpw upload.Enable debug logging
Enable debug logging