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 🙏

© 2026 – Pkg Stats / Ryan Hefner

tdpw

v1.0.33

Published

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

Downloads

22,494

Readme

TestDino CLI (tdpw)

npm version Node.js License: MIT

TestDino CLI - Upload Playwright test reports and manage test metadata for the TestDino platform.

Quick Start

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

# Upload with run tags for categorization
npx tdpw upload ./playwright-report --token="your-api-token" --tag="regression,smoke"

# Cache test metadata for intelligent reruns
npx tdpw cache --token="your-api-token"

# Get previously failed tests
npx tdpw last-failed --token="your-api-token"

Installation

Using npx (Recommended)

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

Global Installation

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

Project Dependency

npm install --save-dev tdpw

Commands

Upload

Upload Playwright test reports to TestDino.

# Basic upload
npx tdpw upload ./playwright-report --token="your-token"

# Upload with all attachments (images, videos, traces)
npx tdpw upload ./playwright-report --token="your-token" --upload-full-json

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

# Upload with run tags for categorization and filtering
npx tdpw upload ./playwright-report --token="your-token" --tag="regression,smoke,v1.2.3"

Options:

| Option | Description | Default | | ----------------------- | --------------------------------------------------- | --------- | | <report-directory> | Directory containing Playwright reports | Required | | -t, --token <value> | TestDino API token | Required | | --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 |

JSON Output (CI/CD Integration)

Use --json to get machine-readable output for CI/CD pipelines. When active, all human-readable output goes to stderr and only a JSON object is written to stdout.

# Capture test run ID and URL
RESULT=$(npx tdpw upload ./playwright-report --token="$TESTDINO_TOKEN" --json)
TEST_RUN_ID=$(echo "$RESULT" | jq -r '.data.testRunId')
URL=$(echo "$RESULT" | jq -r '.data.url')

# Post results to a GitHub PR comment
gh pr comment --body "TestDino results: $URL"

Success output:

{
  "success": true,
  "data": { "testRunId": "test_run_abc123", "url": "https://app.testdino.com/..." }
}

Error output:

{
  "success": false,
  "error": { "code": "AUTH_ERROR", "message": "Invalid API key or unauthorized access" }
}

Cache

Store test execution metadata after Playwright runs for intelligent reruns.

# Basic usage
npx tdpw cache --token="your-token"

# With custom working directory
npx tdpw cache --working-dir ./test-results --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

Retrieve previously failed tests for selective reruns.

# Get failed test files
npx tdpw last-failed --token="your-token"

# Run only failed tests with Playwright
npx playwright test $(npx tdpw last-failed --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 |

Environment Variables

export TESTDINO_TOKEN="your-api-token"
export TESTDINO_TARGET_ENV="staging"                # Optional: Test run target environment
export TESTDINO_RUN_TAGS="regression,smoke"         # Optional: Comma-separated run tags

Run Tags

Run tags allow you to categorize and filter test runs in TestDino. Unlike test case tags (defined with @tag annotations in your test files), run tags are applied to the entire test run via the CLI.

Use Cases

  • Test Types: --tag="smoke,regression,e2e"
  • Release Versions: --tag="v1.2.3,release-candidate"
  • CI Triggers: --tag="nightly,scheduled,manual"
  • Feature Branches: --tag="feature-auth,sprint-42"

Tag Format

Tags must contain only letters, numbers, hyphens, underscores, and dots:

  • Valid: regression, v1.2.3, feature-test, nightly_run
  • Invalid: my tag, test@123, tag#1

Tag Limits

  • Maximum of 5 tags per test run
  • If more than 5 tags are provided, only the first 5 will be used (with a warning)

Analytics

Run tags appear in the TestDino Analytics dashboard under the Tags tab, where you can:

  • View test execution trends filtered by run tags
  • Compare pass/fail/flaky rates across different tags
  • See the relationship between run tags and test case tags

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 and capture results (JSON mode)
        if: always()
        run: |
          RESULT=$(npx tdpw upload ./playwright-report --token="${{ secrets.TESTDINO_TOKEN }}" --json)
          URL=$(echo "$RESULT" | jq -r '.data.url')
          echo "TESTDINO_URL=$URL" >> $GITHUB_ENV

      - name: Comment on PR
        if: always() && github.event_name == 'pull_request'
        run: gh pr comment ${{ github.event.number }} --body "TestDino results: ${{ env.TESTDINO_URL }}"

GitLab CI

playwright-tests:
  image: node:18
  script:
    - npm ci
    - npx playwright install --with-deps
    - npx playwright test
    - npx tdpw upload ./playwright-report --token="$TESTDINO_TOKEN"
  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"'
            }
        }
    }
}

Authentication

Getting Your Token

  1. Sign up at TestDino
  2. Navigate to Project > Settings > API Tokens
  3. Generate a new token
  4. Store it securely in your CI/CD secrets

Security Best Practices

  • Never commit tokens to version control
  • Use environment variables or CI/CD secrets
  • Rotate tokens regularly

Example Workflows

Basic Upload

# Run tests and upload results
npx playwright test
npx tdpw upload ./playwright-report --token="$TESTDINO_TOKEN" --upload-full-json

# Upload with run tags for better organization
npx tdpw upload ./playwright-report --token="$TESTDINO_TOKEN" --tag="nightly,regression" --upload-full-json

Intelligent Test Reruns

# First run: execute all tests and cache metadata
npx playwright test
npx tdpw cache --token="$TESTDINO_TOKEN"

# Subsequent runs: execute only previously failed tests
npx playwright test $(npx tdpw last-failed --token="$TESTDINO_TOKEN")

Complete CI Workflow

#!/bin/bash
# Run all tests
npx playwright test
TEST_EXIT_CODE=$?

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

# Upload reports
npx tdpw upload ./playwright-report --token="$TESTDINO_TOKEN" --upload-full-json

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

Support


Made with ❤️ by the TestDino team