@joseph.adams/prism
v0.11.0
Published
A modern test report viewer for Playwright/Allure results — no extra tooling required
Maintainers
Readme
Prism
A personal project built to solve my own test reporting needs — a modern, lightweight viewer for Playwright + Allure results.
Reads directly from your allure-results folder — no allure generate, no extra pipeline steps. Run your tests, point Prism at the results, open your browser.
Published to npm purely as a convenient way to install and deploy it across my own projects. It's not intended as a general-purpose open source tool, but you're welcome to use it if it fits your needs.
Installation
npm install -g @joseph.adams/prismOr without installing:
npx @joseph.adams/prism --results=./allure-resultsUsage
Local / interactive (server mode)
From your Playwright project root:
prism --results=./allure-resultsOpen http://localhost:4999 in your browser.
| Flag | Default | Description |
| ------------------ | ------------------ | ---------------------------------- |
| --results=<path> | ./allure-results | Path to your allure-results folder |
| --port=<number> | 4999 | Port to run the server on |
Adding to your project scripts
{
"scripts": {
"test:login": "npx playwright test --grep \"(@login)\"",
"report": "prism --results=./allure-results"
}
}Jenkins / CI (static export mode)
For Jenkins and other CI environments, use the static export command. This generates a self-contained report folder with all data, styles, scripts and attachments (screenshots, videos) — no server required.
prism-export --results=./allure-results --export=./prism-reportOutput structure:
prism-report/
├── index.html
├── assets/
│ ├── index-abc123.js
│ └── index-abc123.css
└── attachments/
├── 2b6eecff-fb5f-4f10-9cf3-3cde91bdddac-attachment.png
├── a776d1ed-7688-4b29-81fc-349d67b07790-attachment.webm
└── 5b90295c-a4bb-48b7-979c-6007a961d976-attachment.txt| Flag | Default | Description |
| ------------------ | ------------------ | -------------------------------------- |
| --results=<path> | ./allure-results | Path to your allure-results folder |
| --export=<path> | ./prism-report | Output directory for the static report |
HTML Publisher plugin configuration
In Jenkins, go to your job → Configure → Post-build Actions → Publish HTML reports:
| Field | Value |
| ------------------------ | ------------------ |
| HTML directory to archive | prism-report |
| Index page(s) | index.html |
| Report title | Prism Report |
| Keep past HTML reports | ✓ |
| Always link to last build | ✓ |
Jenkins pipeline example
pipeline {
agent any
stages {
stage('Test') {
steps {
sh 'npm run test:login'
}
}
stage('Report') {
steps {
sh 'npx @joseph.adams/prism-export --results=./allure-results --export=./prism-report'
}
}
}
post {
always {
publishHTML(target: [
allowMissing : false,
alwaysLinkToLastBuild: true,
keepAll : true,
reportDir : 'prism-report',
reportFiles : 'index.html',
reportName : 'Prism Report'
])
}
}
}Note: Jenkins' default Content Security Policy may block the report scripts. If the report shows a blank page, add this to your Jenkins script console:
System.setProperty("hudson.model.DirectoryBrowserSupport.CSP", "")Or configure it via the Jenkins administration panel under Script Console.
Theming
Prism resolves the theme file in the following order — the first file found wins:
prism-theme.jsonin your current working directory — project-level override. Drop this in your Playwright project root to customise per-project.~/.prism/prism-theme.json— user-level default. Set this once and all projects inherit it unless overridden.- Built-in default theme — always present as a fallback. Light theme, indigo accent.
Prism logs which theme file it is using on startup.
Theme file format
{
"reportTitle": "My Project",
"defaultTheme": "light",
"allowThemeToggle": true,
"colors": {
"light": {
"passed": "#22c55e",
"failed": "#ef4444",
"broken": "#f97316",
"skipped": "#94a3b8",
"unknown": "#64748b",
"accent": "#6366f1",
"background": "#f8fafc",
"surface": "#ffffff",
"surface2": "#f1f5f9",
"text": "#0f172a",
"textMuted": "#64748b",
"border": "#e2e8f0"
},
"dark": {
"passed": "#4ade80",
"failed": "#f87171",
"broken": "#fb923c",
"skipped": "#94a3b8",
"unknown": "#64748b",
"accent": "#818cf8",
"background": "#0f1117",
"surface": "#1a1d27",
"surface2": "#22263a",
"text": "#f1f5f9",
"textMuted": "#94a3b8",
"border": "#2a2d3a"
}
}
}Views
| View | Description | | ------------- | ------------------------------------------------------------ | | Overview | Pass rate, status counts, severity breakdown, timing | | Categories | Failures grouped by error message with count badges | | Suites | Test tree by parent/sub suite with sort and status filters | | Graphs | Status donut, severity bar, duration histogram, trend charts | | Timeline | Gantt-style execution view across hosts and threads | | Behaviours | Tests organised by epic → feature → story | | Tags | Tests grouped by tag | | History Trend | Pass rate and result trends across builds |
Publishing to npm
Set your npm access token (valid for 90 days), then publish:
npm config set //registry.npmjs.org/:_authToken <your-token>
npm publishRequirements
- Node.js 18 or higher
- Playwright configured with the Allure reporter (
allure-playwright)
