Skip to main content
testdino is a Python CLI that uploads pytest-based Playwright reports, caches test metadata, and retrieves failed tests for reruns.

Quick Reference

TopicLink
Installationpip install testdino
Quick StartRun tests, upload, cache
Commandsupload, cache, last-failed
ConfigurationEnvironment variables
CI/CDGitHub Actions, GitLab CI, Jenkins

Prerequisites

  • Python >= 3.9
  • pytest with pytest-playwright
  • pytest-playwright-json (generates the required JSON report)
  • TestDino API token (generate one)
  • Git initialized repository (for commit and branch metadata)

Installation

pip install pytest-playwright-json pytest-html testdino

Quick Start

1

Run tests with JSON output

pytest \
  --playwright-json=test-results/report.json \
  --html=test-results/index.html \
  --self-contained-html
2

Upload the report

testdino upload ./test-results --token="$TESTDINO_TOKEN"
3

Cache metadata for reruns

testdino cache --working-dir test-results --token="$TESTDINO_TOKEN"
The upload command requires a JSON report. Always run pytest with the --playwright-json flag.

Commands

upload

Upload Playwright test reports and artifacts to TestDino.
testdino upload <report-directory> --token="$TESTDINO_TOKEN"
Upload flags:
FlagDescription
--upload-imagesUpload screenshots
--upload-videosUpload video recordings
--upload-htmlUpload HTML reports
--upload-tracesUpload trace files
--upload-filesUpload file attachments (.md, .pdf, .txt, .log)
--upload-full-jsonUpload all attachments
# Upload with all artifacts
testdino upload ./test-results --token="$TESTDINO_TOKEN" --upload-full-json

# Upload with specific artifacts
testdino upload ./test-results --token="$TESTDINO_TOKEN" --upload-images --upload-videos

# Upload with environment tag
testdino upload ./test-results --token="$TESTDINO_TOKEN" --environment="staging"

cache

Store test execution metadata after a run. Powers the last-failed command.
testdino cache --working-dir test-results --token="$TESTDINO_TOKEN"
OptionDescriptionDefault
--working-dir <path>Directory containing test resultsCurrent directory
--cache-id <value>Custom cache ID overrideAuto-detected

last-failed

Retrieve cached test failures for reruns. Outputs test identifiers that pass directly to pytest.
# Print failed tests
testdino last-failed --token="$TESTDINO_TOKEN"

# Rerun only failed tests
pytest $(testdino last-failed --token="$TESTDINO_TOKEN")

# Failed tests for a specific shard
testdino last-failed --shard="2/5" --token="$TESTDINO_TOKEN"
OptionDescriptionDefault
--branch <value>Branch name overrideAuto-detected
--commit <value>Commit hash overrideAuto-detected
--shard <value>Shard specification (e.g., 2/5)None
--environment <value>Environment name for filteringNone
--cache-id <value>Custom cache ID overrideAuto-detected

Global Options

These options apply to all commands.
OptionDescription
-t, --token <value>TestDino API token (required)
-v, --verboseEnable verbose logging

Configuration

Set environment variables to avoid passing flags with each command.
VariableDescription
TESTDINO_TOKENAuthentication token
TESTDINO_TARGET_ENVDefault environment tag
export TESTDINO_TOKEN="your-api-token"
export TESTDINO_TARGET_ENV="staging"

CI/CD Integration

.github/workflows/test.yml
name: Playwright Tests
on: [push, pull_request]

jobs:
  test:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
        with:
          fetch-depth: 0
      - uses: actions/setup-python@v5
        with:
          python-version: '3.11'

      - name: Install dependencies
        run: |
          pip install pytest pytest-playwright pytest-playwright-json pytest-html testdino
          playwright install chromium --with-deps

      - name: Run tests
        run: |
          pytest \
            --playwright-json=test-results/report.json \
            --html=test-results/index.html \
            --self-contained-html

      - name: Cache metadata
        if: always()
        run: testdino cache --working-dir test-results --token="${{ secrets.TESTDINO_TOKEN }}"

      - name: Upload reports
        if: always()
        env:
          TESTDINO_TOKEN: ${{ secrets.TESTDINO_TOKEN }}
        run: testdino upload ./test-results --token="${{ secrets.TESTDINO_TOKEN }}" --upload-full-json

View Test Runs

Explore test results in the platform

CI Optimization

Optimize your CI pipeline

Node.js CLI

Use TestDino with Playwright for Node.js

Generate API Keys

Create and manage API tokens