deflake
v1.2.51
Published
AI-powered self-healing tool for Playwright, Cypress, and WebdriverIO tests.
Maintainers
Readme
DeFlake (JavaScript Client) ❄️
Stop Flaky Tests. Start Auto-Healing. Official Node.js client for DeFlake.
🚀 Installation
npm install deflake --save-dev🔧 Usage
Wrapper Mode (Zero Config)
Simply prepend npx deflake to your test run command. DeFlake will automatically wrap the execution and analyze failures.
# Playwright
npx deflake npx playwright test
# Cypress
npx deflake npx cypress runnpx deflake doctor🍎 macOS Permission Requirements
On macOS, if your project folder is located in Documents or Desktop, DeFlake may be blocked from reading test results.
- Move Project: Move your folder out of Documents (e.g., to
/Users/hugo/code/). - Full Disk Access: Grant "Full Disk Access" to your Terminal/iTerm in System Settings > Privacy & Security.
Manual Mode
Analyze an existing error log and HTML/Image snapshot:
npx deflake --log error.log --html cypress/screenshots/my-test-failure.png🌲 Cypress Integration Tips
For the best experience with Cypress, we recommend adding a standardized script to your package.json:
"scripts": {
"test:deflake": "deflake npx cypress run"
}Then run it using:
npm run test:deflakeDeFlake automatically scans cypress/screenshots to find failure artifacts (images) for analysis.
📄 Support & Documentation
For issues, feature requests, or to get your API key, please visit our Official Portal.
© 2026 DeFlake AI. All rights reserved.
