flakewatch-playwright
v0.2.0
Published
Playwright reporter plugin that captures test failures and triages them with AI
Downloads
268
Maintainers
Readme
flakewatch-playwright
Playwright reporter plugin for Flakewatch -- automatically analyzes test failures when your suite finishes.
Install
npm install flakewatch-playwrightSetup
Add it to your Playwright config:
// playwright.config.ts
export default defineConfig({
reporter: [
['html'],
['flakewatch-playwright'],
],
});Set your API key:
export ANTHROPIC_API_KEY=sk-ant-...That's it. When tests fail, the reporter will analyze them and write a report to ./flakewatch-reports/.
Options
reporter: [
['flakewatch-playwright', {
configPath: './flakewatch.config.ts', // Custom config file
config: { // Inline config overrides
llm: { model: 'claude-sonnet-4-20250514' },
output: { format: 'json' },
},
quiet: false, // Suppress console output
}],
],How it works
The reporter hooks into Playwright's onTestEnd to capture failures (error messages, stack traces, screenshots, traces), then runs the Flakewatch triage pipeline after all tests complete.
License
MIT
