Skip to main content
@testdino/playwright is a real-time streaming reporter and CLI for Playwright. Test results appear on the TestDino dashboard as each test executes.

Quick Reference

TopicLink
Installationnpm install @testdino/playwright
CLI usagenpx tdpw test
Playwright reporterAdd to playwright.config.ts
ConfigurationOptions, config file, priority order
CI/CDGitHub Actions, GitLab CI

Prerequisites

  • Node.js >= 18.0.0
  • @playwright/test >= 1.52.0
  • TestDino API token (generate one)
  • Git initialized repository (for commit and branch metadata)

Installation

npm install @testdino/playwright

Usage

There are two ways to use the package. Pick one based on your workflow.
MethodWhen to use
CLI (tdpw test) (Recommended)Wraps npx playwright test. Fastest setup.
Playwright reporterAdd to playwright.config.ts. Works with existing scripts.
Both methods provide real-time streaming, artifact uploads, and metadata collection.

Usage: CLI

The tdpw test command wraps npx playwright test and streams results to TestDino.
npx tdpw test [testdino-options] [playwright-options] [test-files]
1

Set your API token

export TESTDINO_TOKEN="your-api-token"
2

Run tests

npx tdpw test
Or pass the token inline:
npx tdpw test --token="your-api-token"
3

Run a specific file

npx tdpw test tests/login.spec.ts
All Playwright CLI options pass through. Any flag that works with npx playwright test also works with npx tdpw test.
npx tdpw test --headed --project=chromium --workers=4
npx tdpw test --shard=1/4
npx tdpw test --grep="login" --retries=2
npx tdpw test --tag="regression,smoke"

Usage: Playwright Reporter

Add @testdino/playwright as a reporter in your Playwright config. This provides the same streaming behavior without changing your test command.
playwright.config.ts
import { defineConfig } from '@playwright/test';

export default defineConfig({
  reporter: [
    ['@testdino/playwright', { token: process.env.TESTDINO_TOKEN }],
    ['html'],
  ],
});
Then run tests normally:
npx playwright test
TestDino works alongside HTML, JUnit, or any other Playwright reporter.

Configuration

TestDino Options

These options apply to both CLI and reporter usage.
OptionCLI FlagDescription
token--token, -tAuthentication token (required)
debug--debugEnable debug logging
ciRunId--ci-run-idGroup sharded test runs into a single run
artifacts--no-artifactsDisable artifact uploads (enabled by default)
coverage--coverageEnable code coverage collection
coverageReport--coverage-reportGenerate a local Istanbul HTML report after tests
coverageReportDir--coverage-report-dirOutput directory for the local report (default: ./coverage)
tag--tagComma-separated tags to attach to the test run (e.g., regression,smoke)
Set --ci-run-id when running sharded tests across multiple machines. This ensures all shards merge into a single test run on the dashboard.

Environment Variables

VariableDescription
TESTDINO_TOKENAuthentication token
TESTDINO_DEBUGSet to true to enable debug logging

Config File

Create testdino.config.ts (or .js) in your project root for persistent settings.
testdino.config.ts
export default {
  token: process.env.TESTDINO_TOKEN,
  debug: false,
  artifacts: true,
  coverage: {
    enabled: true,
    localReport: true,
    localReportDir: './coverage-report',
  },
};

CI/CD Integration

Streaming works the same in CI as locally.
.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-node@v4
        with:
          node-version: '20'

      - name: Install dependencies
        run: npm ci

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

      - name: Run Playwright Tests
        env:
          TESTDINO_TOKEN: ${{ secrets.TESTDINO_TOKEN }}
        run: npx tdpw test

What Gets Collected

The reporter collects metadata automatically. Collection is non-blocking.
CategoryData
GitBranch, commit hash, author, message, repository URL
CIProvider, build ID, PR details
SystemOS, CPU, memory, Node.js version
PlaywrightVersion, workers, projects, shard info
ArtifactsScreenshots, videos, traces, console output
CoveragePer-file statement, branch, function, and line metrics (when enabled)
Annotationstestdino: annotations from test metadata (guide)

Troubleshooting

Verify the token is set:
echo $TESTDINO_TOKEN
Pass it directly to confirm:
npx tdpw test --token="your-api-token"
Generate a new token from API Keys if the issue persists.
Your account reached its monthly quota. Tests continue to run normally. Only streaming to TestDino pauses until the quota resets.Upgrade your plan or wait for the monthly reset.
TestDino falls back to HTTP when WebSocket connections fail. Test execution is not affected. Check your network or firewall if warnings persist.
npx tdpw test --debug
Or set the environment variable:
export TESTDINO_DEBUG=true
npx tdpw test
Explore test results, optimize your CI pipeline, and manage API keys.