@rc34-labs/playwright-reporter
v0.1.3
Published
Playwright reporter that streams test results to a Rocketium backend (Currents-compatible data model)
Downloads
34
Maintainers
Readme
@rc34-labs/playwright-reporter
Playwright reporter that streams E2E results to your backend — a self-hosted alternative to @currents/playwright.
Features (v0.1)
- 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 - Same reporter tuple pattern as Currents
Install
pnpm add -D @rc34-labs/playwright-reporter @playwright/testIf install fails with 404 or No versions available:
- Log out and retry (public packages do not need auth):
pnpm logout
pnpm add -D @rc34-labs/playwright-reporter @playwright/test- If that still fails, the npm package index may be out of sync after staged publish. Install the tarball directly:
npm install -D https://registry.npmjs.org/@rc34-labs/playwright-reporter/-/playwright-reporter-0.1.1.tgzMaintainers: fix the index by publishing 0.1.2+ with npm publish (not npm stage publish) and 2FA.
For local development:
pnpm add -D file:../rocketium-playwright-reporterPlaywright config
import { defineConfig } from "@playwright/test";
import { rocketiumReporter } from "@rc34-labs/playwright-reporter";
export default defineConfig({
reporter:
process.env.CI && !process.env.DISABLE_REPORTER
? [rocketiumReporter(), ["html", { open: "never" }], ["list"]]
: [["html", { open: "never" }], ["list"]],
});Environment variables
| Variable | Required | Description |
|----------|----------|-------------|
| REPORTER_API_URL | yes | Backend base URL |
| REPORTER_PROJECT_ID | yes | Project identifier |
| REPORTER_API_KEY | no | Bearer token |
| REPORTER_CI_BUILD_ID | no | Defaults to GITHUB_RUN_ID |
| REPORTER_SHARD_NUMBER | no | Matrix shard (default 1) |
| REPORTER_EXPECTED_SHARD_COUNT | no | e.g. 29 |
| REPORTER_UPLOAD_ARTIFACTS | no | Set false to skip |
| REPORTER_DEBUG | no | Set true for logs |
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: 29Backend API
See docs/api-contract.md for endpoint payloads.
Development
pnpm install
pnpm build
pnpm type-check
pnpm run check-published # confirms the version exists on npmPublishing (maintainers)
Publish as project-lab-test (owner of the rc34-labs org):
pnpm whoami # must print project-lab-test
pnpm run check-published # should fail until a version is live
npm publish # complete 2FA when prompted
pnpm run check-published # should pass after publishIf npm uses staged publishing, open npm Staged Packages, approve the version with 2FA, then run pnpm run check-published again.
Preferred (fixes install index):
npm publish # 2FA in browser — use this for releases consumers can install
pnpm run check-publishedStaged flow (can leave the registry index empty until npm syncs; prefer npm publish above):
npx [email protected] stage publish
npx [email protected] stage list
npx [email protected] stage approve <stage-id-from-list>
pnpm run check-publishedLicense
ISC
