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-rocketium-reporter

v2.1.2

Published

Playwright reporter that streams test results to a Rocketium backend (Currents-compatible data model)

Readme

playwright-rocketium-reporter

Playwright reporter that streams E2E results to your backend — a self-hosted alternative to @currents/playwright.

Features (v1.0.0)

  • Run / shard / spec / test hierarchy matching Currents UI
  • Git + GitHub Actions metadata
  • Failure artifact upload (screenshots, videos, error-context.md)
  • Multi-shard grouping via ciBuildId + shardNumber
  • Per-attempt retryIndex on each test result (retries reported separately; shard summary uses the final attempt only)
  • Same reporter tuple pattern as Currents

Install

pnpm add playwright-rocketium-reporter
# or link locally while developing:
pnpm add file:../playwright-rocketium-reporter

Playwright config

import { defineConfig } from "@playwright/test";
import { rocketiumReporter } from "playwright-rocketium-reporter";

export default defineConfig({
  reporter:
    process.env.CI && !process.env.DISABLE_REPORTER
      ? [rocketiumReporter(), ["html", { open: "never" }], ["list"]]
      : [["html", { open: "never" }], ["list"]],
});

Environment variables

Set either REPORTER_API_URL (stream to backend) or REPORTER_OUTPUT_DIR (write JSON payloads to disk). REPORTER_PROJECT_ID is always required.

| Variable | Required | Description | |----------|----------|-------------| | REPORTER_API_URL | one of API URL / output dir | Backend base URL. Alias: ROCKETIUM_REPORTER_API_URL | | REPORTER_OUTPUT_DIR | one of API URL / output dir | Local directory for file-sink mode (no HTTP). Writes run data under {outputDir}/{ciBuildId}/. Alias: ROCKETIUM_REPORTER_OUTPUT_DIR | | REPORTER_PROJECT_ID | yes | Project identifier. Alias: ROCKETIUM_REPORTER_PROJECT_ID | | REPORTER_API_KEY | no | Bearer token. Alias: ROCKETIUM_REPORTER_API_KEY | | REPORTER_CI_BUILD_ID | no | Build/run id. Defaults to GITHUB_RUN_ID, then local-{uuid} | | REPORTER_SHARD_NUMBER | no | Matrix shard (default 1). Fallback: SHARD_NUMBER | | REPORTER_EXPECTED_SHARD_COUNT | no | e.g. 29. Fallback: EXPECTED_SHARD_COUNT | | REPORTER_MACHINE_ID | no | Machine identifier. Fallback: HOSTNAME, then random UUID | | REPORTER_TAGS | no | Comma-separated tags (e.g. staging,smoke) | | REPORTER_UPLOAD_ARTIFACTS | no | Set false to skip | | REPORTER_DEBUG | no | Set true for verbose API client console logs | | REPORTER_SPEC_VIDEO_MANIFEST_DIR | no | Directory with per-spec video manifest JSON files (default test-results/spec-video-manifest) |

File-sink mode (REPORTER_OUTPUT_DIR)

When outputDir is set (via env or reporter options), the reporter uses FileSinkClient instead of the HTTP API. Each run is written to:

{REPORTER_OUTPUT_DIR}/{ciBuildId}/
  run-start.json
  shard-finish.json
  tests/
    001-{testId}-r0.json
    001-{testId}-r1.json   # one file per retry attempt
  artifacts/
    {testId}-r0-{filename}

Useful for local debugging or offline ingestion without a running backend.

Spec-level video mapping (shared browser context)

Some suites use one shared browser.newContext({ recordVideo }) per spec file (serial describe blocks). Playwright writes the video when context.close() runs in afterAll, which happens after onTestEnd — so videos are not in result.attachments during the test hook.

Flow:

  1. Spec afterAll — close context and write a manifest JSON:
    test-results/spec-video-manifest/LayerPanel.spec.ts.json
    {
      "specPath": "e2e/editor-tests-V2/LayersPanel/LayerPanel.spec.ts",
      "videoPath": "test-results/videos/[email protected]",
      "contentType": "video/webm",
      "registeredAt": "2026-06-09T19:36:17.805Z"
    }
  2. onTestEnd — reporter records failed tests (testId, specPath, retryIndex) in memory.
  3. onEnd — reporter reads spec-video-manifest/, matches manifest specPath to each failed test, and uploads the video artifact.

Videos are mapped per spec file (one video covers the whole serial suite), not per individual test.

In your test repo, use the helper from e2e/common/specVideoManifest.ts:

import { closeContextAndRegisterSpecVideo } from "../../common/specVideoManifest";

const SPEC_FILE = "e2e/editor-tests-V2/LayersPanel/LayerPanel.spec.ts";

test.afterAll(async () => {
  if (context && sharedPage) {
    await closeContextAndRegisterSpecVideo(context, sharedPage, SPEC_FILE);
  }
});

Override the manifest directory with REPORTER_SPEC_VIDEO_MANIFEST_DIR if your specs write elsewhere.

Retries (retryIndex)

Each Playwright retry emits a separate onTestEnd event. The reporter sends retryIndex (0-based, from result.retry) on every /api/v1/runs/tests payload so the backend/UI can mark flaky tests. Intermediate failed attempts are still reported (with artifacts when enabled), but the shard summary counts only the final attempt per test.

// via env
process.env.REPORTER_OUTPUT_DIR = "./reporter-output";
process.env.REPORTER_PROJECT_ID = "rocketium-staging";

// or via reporter options
reporter: [rocketiumReporter({ outputDir: "./reporter-output", projectId: "rocketium-staging" })],

GitHub Actions (staging shard)

Add to your test job:

env:
  REPORTER_API_URL: ${{ secrets.REPORTER_API_URL }}
  REPORTER_PROJECT_ID: rocketium-staging
  REPORTER_API_KEY: ${{ secrets.REPORTER_API_KEY }}
  REPORTER_CI_BUILD_ID: ${{ github.run_id }}
  REPORTER_SHARD_NUMBER: ${{ matrix.shard }}
  REPORTER_EXPECTED_SHARD_COUNT: 29

Backend API

See docs/api-contract.md for endpoint payloads.

Development

pnpm install
pnpm build
pnpm type-check

License

ISC