CLI tool for uploading Playwright test reports to TestDino platform with TestDino storage support
This project has been archived.
The maintainers of this project have marked this project as archived. No new releases are expected.
Project description
tdpw
TestDino CLI - Cache test metadata and upload Playwright test reports to TestDino platform
Quick Start
Cache Command
# Cache test execution metadata after Playwright runs
tdpw cache --token="your-api-token"
# With verbose logging
tdpw cache --verbose
Last Failed Command
# Get last failed test cases for Playwright reruns
tdpw last-failed --token="your-api-token"
# Run only last failed tests
pytest $(tdpw last-failed --token="your-api-token")
Upload Command
# Upload test reports with attachments
tdpw upload ./test-results --token="your-api-token"
# Upload all attachments
tdpw upload ./test-results --token="your-api-token" --upload-full-json
Installation
pip
pip install tdpw
tdpw <command> --token="your-token"
pipx (isolated install)
pipx install tdpw
tdpw <command> --token="your-token"
Project Dependency
pip install tdpw
# or add to requirements.txt / pyproject.toml
Features
- Test Metadata Caching - Store test execution metadata after Playwright runs
- Last Failed Tests - Retrieve and rerun only failed tests for faster CI/CD pipelines
- Zero Configuration - Auto-discovers Playwright reports and configuration
- Smart Shard Detection - Automatically detects Playwright shard information
- CI/CD Ready - Works seamlessly with GitHub Actions, GitLab CI, Jenkins, Azure DevOps
- Secure Authentication - Token-based API authentication
Commands
Cache Command
Store test execution metadata after Playwright runs.
# Basic usage
tdpw cache --token="your-token"
# With custom working directory
tdpw cache --working-dir ./test-results --token="your-token"
# With verbose logging
tdpw cache --verbose --token="your-token"
Options:
| Option | 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 Command
Retrieve cached test failures for intelligent reruns.
# Basic usage
tdpw last-failed --token="your-token"
# Run only last failed tests
pytest $(tdpw last-failed --token="your-token")
# With custom branch and commit
tdpw last-failed --branch="main" --commit="abc123" --token="your-token"
Options:
| Option | 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 |
Upload Command
Upload test reports with attachments.
# Basic upload
tdpw upload ./test-results --token="your-token"
# Upload with attachments
tdpw upload ./test-results --token="your-token" --upload-images --upload-videos
# Upload all attachments
tdpw upload ./test-results --token="your-token" --upload-full-json
Options:
| Option | Description |
|---|---|
<report-directory> |
Directory containing Playwright reports (required) |
-t, --token <value> |
TestDino API token (required) |
--upload-images |
Upload image attachments |
--upload-videos |
Upload video attachments |
--upload-html |
Upload HTML reports |
--upload-traces |
Upload trace files |
--upload-files |
Upload file attachments (.md, .pdf, .txt, .log) |
--upload-full-json |
Upload all attachments |
-v, --verbose |
Enable verbose logging |
Environment Variables
export TESTDINO_TOKEN="your-api-token"
export TESTDINO_API_URL="https://api.testdino.com" # Optional: Custom API endpoint
CI/CD Integration
GitHub Actions
name: Playwright Tests
on: [push, pull_request]
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Install dependencies
run: |
pip install pytest pytest-playwright pytest-playwright-json tdpw
playwright install chromium --with-deps
- name: Run tests
run: pytest --playwright-json=test-results/report.json
- name: Upload test reports
if: always()
run: tdpw upload ./test-results --token="${{ secrets.TESTDINO_TOKEN }}" --upload-full-json
GitLab CI
image: python:3.11
stages:
- test
playwright-tests:
stage: test
script:
- pip install pytest pytest-playwright pytest-playwright-json tdpw
- playwright install chromium --with-deps
- pytest --playwright-json=test-results/report.json
- tdpw upload ./test-results --token="$TESTDINO_TOKEN" --upload-full-json
when: always
Jenkins
pipeline {
agent any
environment {
TESTDINO_TOKEN = credentials('testdino-token')
}
stages {
stage('Test') {
steps {
sh 'pip install pytest pytest-playwright pytest-playwright-json tdpw'
sh 'playwright install chromium --with-deps'
sh 'pytest --playwright-json=test-results/report.json'
sh 'tdpw upload ./test-results --token="$TESTDINO_TOKEN" --upload-full-json'
}
}
}
}
Authentication
Getting Your Token
- Sign up at TestDino
- Navigate to Settings > API Tokens
- Generate a new token
- Store it securely in your CI/CD secrets
Token Format:
trx_{environment}_{64-character-hex-string}
Security Best Practices:
- Never commit tokens to version control
- Use environment variables or CI/CD secrets
- Rotate tokens regularly
Examples
Basic Workflow
# Run tests and cache metadata
pytest --playwright-json=test-results/report.json
tdpw cache --token="your-token"
Intelligent Test Reruns
# Run tests and cache results
pytest --playwright-json=test-results/report.json
tdpw cache --token="your-token"
# On next run, execute only previously failed tests
pytest $(tdpw last-failed --token="your-token")
Complete CI/CD Workflow
# Run all tests
pytest --playwright-json=test-results/report.json
# Cache test metadata
tdpw cache --token="$TESTDINO_TOKEN"
# Rerun only failed tests
if [ $? -ne 0 ]; then
FAILED=$(tdpw last-failed --token="$TESTDINO_TOKEN")
[ -n "$FAILED" ] && pytest $FAILED
fi
Support
- Documentation: docs.testdino.com
- Issues: GitHub Issues
- Email: support@testdino.com
Made with love by the TestDino team
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file tdpw-1.0.22.tar.gz.
File metadata
- Download URL: tdpw-1.0.22.tar.gz
- Upload date:
- Size: 62.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
876d6863632a7bdaed610f9bb9750a1a9a2178db8bc517dc0fae13739bc6e4db
|
|
| MD5 |
4efad452f2f9d1c65fad54dbb1c88389
|
|
| BLAKE2b-256 |
28ede3f9abff0368f884ffebf926630fd3e1dddae93ddec2a1463e4265f02698
|
File details
Details for the file tdpw-1.0.22-py3-none-any.whl.
File metadata
- Download URL: tdpw-1.0.22-py3-none-any.whl
- Upload date:
- Size: 76.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
dac69985d9fc07985a2f59492e90453e44cbd4d42f79991e508d4172b9b07965
|
|
| MD5 |
4d00607720131a3cbcf7c1b450d29be6
|
|
| BLAKE2b-256 |
ee41d4d5038c1e75cd9bc9646bcdac0dadfe0571c78573b61b1521a9044e69c9
|