@kaizenreport/kensho-playwright
v0.1.1
Published
Kensho reporter for Playwright — writes kensho-results/ during tests so the Kensho CLI can generate a rich HTML report.
Readme
@kaizenreport/kensho-playwright
A Playwright reporter that emits the canonical Kensho v1 JSON format, so the Kensho CLI can generate a beautiful static report (and optionally upload to the KaizenReport platform).
Install
pnpm add -D @kaizenreport/kensho-playwright
# or
npm i -D @kaizenreport/kensho-playwrightConfigure
// playwright.config.ts
import { defineConfig } from '@playwright/test';
export default defineConfig({
reporter: [
['line'], // keep your existing console reporter
['@kaizenreport/kensho-playwright', {
output: 'kensho-results',
project: { name: 'Acme Web', slug: 'acme-web' },
severityFromTag: true, // @blocker / @critical / @normal / @minor / @trivial
}],
],
});Run
npx playwright test
# => kensho-results/ populated with cases/*.json, run.json, attachments/…
npx kensho generate # → kensho-report/
npx kensho openWhat you get
kensho-results/run.json— manifest (project, env, totals, timing)kensho-results/cases/<stableId>.json— one per test casekensho-results/attachments/<stableId>/…— screenshots, videos, traces
Every test gets a stable id hashed from its fullName + file path, so the same test across runs correlates for history & flakiness detection.
Environment auto-detected
- GitHub Actions, CircleCI, GitLab CI, Jenkins, Buildkite — CI provider + branch + commit + runUrl
- OS, architecture, Node version
- Per-test browser, worker index, retry attempt number
Annotations → Kensho labels
test.info().annotations.push({ type: 'owner', description: '@mchen' });
test.info().annotations.push({ type: 'jira', description: 'ACME-1234' });Show up as owner and labels.jira in the case JSON.
