tdpw uploads Playwright test reports to TestDino, caches test metadata for intelligent reruns, and retrieves previously failed tests for selective re-execution.
Use this pre-built prompt to integrate tdpw into your project.
Quick Reference
| Command | What it does |
|---|---|
upload | Upload Playwright JSON and HTML reports to TestDino |
cache | Store test execution metadata for intelligent reruns |
last-failed | Retrieve previously failed tests for selective reruns |
Prerequisites
- Node.js
>= 18.0.0 @playwright/test>= 1.52.0- TestDino API token (generate one)
- Git initialized repository (for commit and branch metadata)
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 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 |
Configure Playwright Reporters
Add JSON and HTML reporters to your Playwright config before uploading:playwright.config.js
The HTML reporter must be listed before the JSON reporter. Playwright’s HTML reporter clears its output directory on each run, so placing it first ensures
report.json is not deleted.CI/CD Integration
- GitHub Actions
- GitHub Actions (JSON output)
- GitLab CI
- Jenkins
.github/workflows/test.yml
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) |
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
Related
View Test Runs
Explore test results in the platform
Rerun Failed Tests
CI workflow for rerunning only failures
Python CLI
Use TestDino with pytest
Code Coverage
Collect coverage from Playwright tests