Reference
Templates
Three pre-compiled templates ship with ReportForge. Choose one via the template option. You can also generate multiple PDFs in one run.
minimal
A single-page summary: pass/fail counts, duration, and a list of failed tests with their error message. No screenshots, no per-test detail. Useful for dashboards and Slack attachments where file size matters.
reporter: [['@reportforge/playwright-pdf', { template: 'minimal' }]]- Always fits on one page regardless of suite size
- No screenshot embedding; smallest file size
- Shows: project name, run date, total / passed / failed / skipped, duration, failed test list
detailed
The default template. One row per test with status, file path, duration, and, for failures, the error message and Playwright screenshot. Designed for developer and QA handoffs.
reporter: [['@reportforge/playwright-pdf', { template: 'detailed' }]]- Summary header + pass-rate chart + per-test table
- Failure sections include error message, stack excerpt, and screenshot
- File size scales with screenshot count; capped by maxFileSizeMb
- Requires use: { screenshot: 'only-on-failure' } to embed screenshots
executive
A stakeholder-friendly report with a large summary KPI block, pass-rate trend chart (when history is enabled), and a condensed test table. No stack traces or screenshots. Optional requirements traceability column.
reporter: [['@reportforge/playwright-pdf', { template: 'executive' }]]- Suitable for email attachments to non-technical stakeholders
- Shows: KPI summary, trend chart, test-count by file/feature, requirement coverage table
- No error messages or stack traces
Multiple templates in one run
Add the reporter twice with different configs to generate two PDFs from the same run without running tests twice.
reporter: [ ['list'], ['@reportforge/playwright-pdf', { template: 'detailed', outputFile: 'reports/{date}-detailed.pdf' }], ['@reportforge/playwright-pdf', { template: 'executive', outputFile: 'reports/{date}-executive.pdf' }],]Both reporters receive the same test results. Chrome is launched once and reused across both renders.
Requirements traceability
The executive template supports a requirements column. Map test title patterns to requirement IDs using the requirementIds option.
reporter: [['@reportforge/playwright-pdf', { template: 'executive', requirementIds: { 'checkout flow': 'REQ-001', 'user login': 'REQ-002', 'password reset': 'REQ-003', },}]]Keys are matched as substrings (case-insensitive) against each test's full title. A test can match multiple requirements. Unmatched tests show a dash in the column.