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

playwright-playtest-reporter

v0.4.1

Published

Playwright reporter for PlayTest test management

Downloads

5

Readme

playwright-playtest-reporter

Playwright reporter for PlayTest test management system.

Installation

npm install --save-dev playwright-playtest-reporter
# or
pnpm add -D playwright-playtest-reporter

Configuration

Add the reporter to your playwright.config.ts:

import { defineConfig } from "@playwright/test";

export default defineConfig({
  reporter: [
    [
      "playwright-playtest-reporter",
      {
        projectId: "your-project-uuid",
        apiToken: "your-api-token",
        baseUrl: "https://playtest-app.fly.dev/api", // optional
        finishRunOnEnd: true,
      },
    ],
  ],
});

Options

| Option | Type | Required | Description | | ---------------- | --------- | -------- | ------------------------------------------------------------------- | | projectId | string | ✅ | UUID of your PlayTest project | | apiToken | string | ✅ | API token for authentication (Bearer token) | | baseUrl | string | ❌ | PlayTest API base URL (default: https://playtest-app.fly.dev/api) | | finishRunOnEnd | boolean | ❌ | Complete test run after all tests finish |

Usage

Link Playwright tests to PlayTest test cases using the playtest() helper function with numeric external IDs:

import { test } from "@playwright/test";
import { playtest } from "playwright-playtest-reporter";

// Single ID (number):
test(playtest(1, "User can login"), async ({ page }) => {
  await page.goto("https://example.com/login");
  await page.fill("#username", "testuser");
  await page.fill("#password", "password123");
  await page.click('button[type="submit"]');
  await expect(page).toHaveURL("/dashboard");
});

// Single ID (string):
test(playtest("2", "User can logout"), async ({ page }) => {
  await page.goto("/logout");
});

// Multiple IDs (first one will be used):
test(playtest([3, 4, 5], "Multi-scenario test"), async ({ page }) => {
  // Test that covers multiple test cases
});

// No ID - auto-create test case:
test("User can add to cart", async ({ page }) => {
  await page.goto("/cart");
  // PlayTest will auto-create test case with next available ID
});

The playtest() function accepts:

  • Single ID: playtest(1, "title") or playtest("1", "title")
  • Multiple IDs: playtest([1, 2, 3], "title") or playtest(["1", "2", "3"], "title")
  • No ID: Test will run and PlayTest will auto-create test case from test title

Note: When using multiple IDs, only the first one is reported to PlayTest.

Environment Variables

Configure the reporter using environment variables:

export PLAYTEST_API_TOKEN=your-api-token
export PLAYTEST_PROJECT_ID=your-project-uuid
export PLAYTEST_RUN_NAME="Regression Tests - Production"
export PLAYTEST_TEST_RUN_UUID=existing-run-uuid  # Optional: use existing run

Status Mapping

| Playwright | PlayTest | | ------------- | --------- | | passed | PASSED | | failed | FAILED | | timedOut | FAILED | | skipped | SKIPPED | | interrupted | BLOCKED |

Running Tests

# Run all tests
npx playwright test

# Run with specific test run name
PLAYTEST_RUN_NAME="Sprint 23 - Smoke Tests" npx playwright test

# Run and use existing test run
PLAYTEST_TEST_RUN_UUID=existing-uuid npx playwright test

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: 20
      - name: Install dependencies
        run: npm ci
      - name: Install Playwright
        run: npx playwright install --with-deps
      - name: Run tests
        env:
          PLAYTEST_API_TOKEN: ${{ secrets.PLAYTEST_API_TOKEN }}
          PLAYTEST_PROJECT_ID: ${{ secrets.PLAYTEST_PROJECT_ID }}
          PLAYTEST_RUN_NAME: "CI Run - ${{ github.ref }}"
        run: npx playwright test

Features

✅ Create test runs automatically
✅ Send test results in real-time
✅ Support for test retries
✅ Environment variable configuration
✅ Simple numeric IDs (1, 2, 3...)
✅ Multiple IDs per test support
✅ Auto-create test cases (no manual setup needed!)
❌ Attachment upload (not supported by PlayTest API yet)

Why PlayTest?

  • Numeric IDs: Easy to remember and reference (Test #1, Test #23)
  • Auto-create: No manual test case setup - just run tests!
  • Simple setup: Zero configuration needed
  • Modern stack: Built for scale

License

MIT