Package Exports
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (flakewatch) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
flakewatch
CLI for Flakewatch -- AI-powered Playwright test failure triage.
Install
npm install -g flakewatchOr use with npx (no install needed):
npx flakewatch analyze --results-dir ./test-resultsCommands
flakewatch analyze
Analyze a Playwright test-results directory.
# Basic usage
npx flakewatch analyze --results-dir ./test-results
# With options
npx flakewatch analyze \
--results-dir ./test-results \
--config ./flakewatch.config.ts \
--format markdown \
--mode full \
--base-url http://localhost:3000Options:
| Flag | Short | Description |
|---|---|---|
--results-dir |
-r |
Path to Playwright test-results directory (default: ./test-results) |
--config |
-c |
Path to config file |
--format |
-f |
Output format: markdown, json, github-comment |
--mode |
-m |
screenshot (default) or full (live browser) |
--base-url |
-b |
App URL (required for full mode) |
flakewatch investigate
Investigate a single test file interactively.
npx flakewatch investigate --test-file ./tests/login.spec.tsSetup
Set your Anthropic API key:
export ANTHROPIC_API_KEY=sk-ant-...Optionally create a flakewatch.config.ts for custom settings. See the main README for config options.
Generating JSON results
Flakewatch works best with Playwright's JSON reporter output. Add it to your test run:
PLAYWRIGHT_JSON_OUTPUT_NAME=test-results/results.json \
npx playwright test --reporter=list,jsonOr in playwright.config.ts:
reporter: [
['list'],
['json', { outputFile: 'test-results/results.json' }],
],License
MIT