Add custom test reporter and improve HTML report configuration#19
Merged
Add custom test reporter and improve HTML report configuration#19
Conversation
Replace the default list reporter with custom reporters: - HTML reporter now has open: "never" to prevent auto-opening - custom-reporter.ts shows a summary with status and duration - database-reporter.ts collects structured test results https://claude.ai/code/session_016kXYDGQ53w5Ek4e3W5oZ7r
The custom-reporter.ts already displays the report command, so the hardcoded message in run-visual-tests.ts is redundant. https://claude.ai/code/session_016kXYDGQ53w5Ek4e3W5oZ7r
Reorder reporters so custom-reporter runs first in onEnd, then filter out the HTML reporter's console message about opening the report with npx playwright show-report. https://claude.ai/code/session_016kXYDGQ53w5Ek4e3W5oZ7r
Playwright's HTML reporter writes the "To open last HTML report" message via process.stdout.write (gated by process.stdin.isTTY), not console.log. Switch to intercepting stdout.write to properly suppress the message. https://claude.ai/code/session_016kXYDGQ53w5Ek4e3W5oZ7r
- generate-visual-baseline.ts: crawling shows inline counter, screenshot generation shows progress bar per viewport, discovery listing removed (only summary kept) - custom-reporter.ts: printsToStdio=true suppresses Playwright's default list reporter; shows progress bar during tests and only failed tests at the end https://claude.ai/code/session_016kXYDGQ53w5Ek4e3W5oZ7r
Instead of dumping the full Playwright error with Call log, extract just the viewport name, page path and pixel diff ratio. https://claude.ai/code/session_016kXYDGQ53w5Ek4e3W5oZ7r
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Enhanced the Playwright test reporting setup by introducing a custom reporter that provides user-friendly test completion feedback and updating the HTML reporter configuration.
Key Changes
open: "never"option to prevent automatic browser opening of reportsreporters/custom-reporter.ts): Implements a new reporter that displays formatted test completion summary including:npm run cli reportplaywright.config.ts: Replaced the list reporter with the new custom reporter while keeping the HTML reporterImplementation Details
Reporterinterface withonEnd()hook to capture final test resultsprintsToStdio()returnsfalseto prevent duplicate outputhttps://claude.ai/code/session_016kXYDGQ53w5Ek4e3W5oZ7r