What you’ll learn
- How to upload Playwright test results from GitHub Actions to TestDino
- How to configure sharded test runs with smart reruns
Prerequisites
Before setting up, ensure you have:- A TestDino account with a project created
- A TestDino API key (Generate API Keys)
- A Playwright test project (or clone the TestDino Example Repository to get started)
- Playwright configured with JSON and HTML reporters in
playwright.config.js:
playwright.config.js
Store the API Key
- Go to your GitHub repository
- Open Settings → Secrets and variables → Actions
- Click New repository secret
- Name:
TESTDINO_TOKEN - Value: Your TestDino API key
- Click Add secret
Basic Workflow
Add the upload step after your Playwright tests:.github/workflows/test.yml
if: always() condition ensures results upload even when tests fail.
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 Tests with Smart Reruns
Run tests in parallel shards with automatic failed test detection:.github/workflows/test.yml
Environment Tagging
Tag uploads with an environment to organize results:Rerun Failed Tests
Cache test metadata to enable selective reruns:Troubleshooting
Upload step skipped after test failure
Upload step skipped after test failure
Add
if: always() to the upload step so it runs regardless of test exit code. For sharded runs, use fail-fast: false in the matrix strategy.report.json not found
report.json not found
Ensure
playwright.config.js includes both HTML and JSON reporters with HTML listed first. Confirm the output directory matches the path passed to tdpw upload.TESTDINO_TOKEN not found
TESTDINO_TOKEN not found
Confirm the secret is set in Settings → Secrets and variables → Actions. Secret names are case-sensitive.
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
GitHub App Integration
PR comments, CI checks, and pull request sync