testreport.io-io
v1.0.5
Published
Playwright HTML test report dashboard and custom reporter — live viewer, flaky tests, PDF/Excel export, and analytics
Maintainers
Readme
Playwright Viewer
Beautiful, lightweight dashboard for viewing Playwright test reports with advanced analytics.
Installation
npm install --save-dev testreport.io-ioQuick Start
1. Add Reporter to Playwright Config (ESM)
In playwright.config.js:
import { defineConfig, devices } from '@playwright/test';
export default defineConfig({
reporter: [
['list'],
['html', { open: 'never' }],
['testreport.io-io/reporter', { outputDir: 'custom-report', fileName: 'results.json' }]
],
// ... rest of config
});1b. Add Reporter to Playwright Config (CommonJS)
const { defineConfig } = require('@playwright/test');
module.exports = defineConfig({
reporter: [
['list'],
['html', { open: 'never' }],
['testreport.io-io/reporter', { outputDir: 'custom-report', fileName: 'results.json' }]
],
// ... rest of config
});Note:
testreport.io-io/reporterandtestreport.io-io/lib/reporter.jsboth work. Use the sameoutputDirwhen serving reports.
2. Run Your Tests
npx playwright testThis generates reports in custom-report/<runId>/results.json.
3. View Reports
npx playwright-viewer serveStarts the dashboard at http://localhost:4173 by default and serves data from the custom-report folder in your current project (or your custom --report-dir).
CLI Options
# Use custom port
npx playwright-viewer serve --port 4300
# Use custom report directory
npx playwright-viewer serve --report-dir ./my-reportsFeatures
- 📊 Real-time test analytics
- 🎨 Beautiful, modern UI
- 📸 Screenshot and video viewing
- 🔍 Detailed test step analysis
- 📈 Pass/fail trends
- 🚀 Zero dependencies
License
MIT
