npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

tdpw

v1.0.26

Published

CLI tool for uploading Playwright test reports to TestDino platform with TestDino storage support

Readme

tdpw

npm version Node.js License: MIT

🦕 TestDino CLI - Cache test metadata and upload Playwright test reports to TestDino platform

🚀 Quick Start

Cache Command

# Cache test execution metadata after Playwright runs
npx tdpw cache --token="your-api-token"

# With verbose logging
npx tdpw cache --verbose

Last Failed Command

# Get last failed test cases for Playwright reruns
npx tdpw last-failed --token="your-api-token"

# Run only last failed tests
npx playwright test $(npx tdpw last-failed --token="your-api-token")

Upload Command

# Upload test reports with attachments
npx tdpw upload ./playwright-report --token="your-api-token"

# Upload all attachments
npx tdpw upload ./playwright-report --token="your-api-token" --upload-full-json

📦 Installation

NPX

npx tdpw <command> --token="your-token"

Global Installation

npm install -g tdpw
tdpw <command> --token="your-token"

Project Dependency

npm install --save-dev tdpw

🎯 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
npx tdpw cache --token="your-token"

# With custom working directory
npx tdpw cache --working-dir ./test-results --token="your-token"

# With verbose logging
npx 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
npx tdpw last-failed --token="your-token"

# Run only last failed tests
npx playwright test $(npx tdpw last-failed --token="your-token")

# With custom branch and commit
npx 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
npx tdpw upload ./playwright-report --token="your-token"

# Upload with attachments
npx tdpw upload ./playwright-report --token="your-token" --upload-images --upload-videos

# Upload all attachments
npx tdpw upload ./playwright-report --token="your-token" --upload-full-json

# Upload with target environment tag
npx tdpw upload ./playwright-report --token="your-token" --environment="staging"

Options:

| Option | Description | Default | | ----------------------- | ------------------------------------------------------ | --------- | | <report-directory> | Directory containing Playwright reports | Required | | -t, --token <value> | TestDino API token | Required | | --environment <value> | Target environment tag (e.g., staging, production, qa) | unknown | | --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 | | -v, --verbose | Enable verbose logging | false |

Environment Variables

export TESTDINO_TOKEN="your-api-token"
export TESTDINO_API_URL="https://api.testdino.com"  # Optional: Custom API endpoint
export TESTDINO_TARGET_ENV="staging"                # Optional: Target environment for Testrun

🔧 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-node@v4
        with:
          node-version: '18'

      - name: Install dependencies
        run: npm ci

      - name: Install Playwright
        run: npx playwright install --with-deps

      - name: Run tests
        run: npx playwright test

      - name: Upload test reports
        if: always()
        run:
          npx tdpw upload ./playwright-report --token="${{ secrets.TESTDINO_TOKEN }}"
          --upload-full-json

GitLab CI

image: node:18

stages:
  - test

playwright-tests:
  stage: test
  script:
    - npm ci
    - npx playwright install --with-deps
    - npx playwright test
    - npx tdpw upload ./playwright-report --token="$TESTDINO_TOKEN" --upload-full-json
  when: always

Jenkins

pipeline {
    agent any

    environment {
        TESTDINO_TOKEN = credentials('testdino-token')
    }

    stages {
        stage('Test') {
            steps {
                sh 'npm ci'
                sh 'npx playwright install --with-deps'
                sh 'npx playwright test'
                sh 'npx tdpw upload ./playwright-report --token="$TESTDINO_TOKEN" --upload-full-json'
            }
        }
    }
}

🔐 Authentication

Getting Your Token

  1. Sign up at TestDino
  2. Navigate to SettingsAPI Tokens
  3. Generate a new token
  4. 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
npx playwright test
npx tdpw cache --token="your-token"

Intelligent Test Reruns

# Run tests and cache results
npx playwright test
npx tdpw cache --token="your-token"

# On next run, execute only previously failed tests
npx playwright test $(npx tdpw last-failed --token="your-token")

Complete CI/CD Workflow

# Run all tests
npx playwright test

# Cache test metadata
npx tdpw cache --token="$TESTDINO_TOKEN"

# Rerun only failed tests
if [ $? -ne 0 ]; then
  FAILED=$(npx tdpw last-failed --token="$TESTDINO_TOKEN")
  [ -n "$FAILED" ] && npx playwright test $FAILED
fi

🆘 Support


Made with ❤️ by the TestDino team