create-playwright-bingo
v1.0.0
Published
A comprehensive Playwright testing framework scaffolding tool
Maintainers
Readme
Playwright Bingo
A comprehensive Playwright testing framework with advanced features for modern web testing.
Features
- 🎯 Page Object Model (POM) with self-healing locators
- 📝 Cucumber BDD support
- 📊 Advanced reporting (PDF, HTML, Allure)
- 🤖 AI-powered test generation and maintenance
- 📱 Cross-browser and mobile testing
- 🔄 Self-healing locators
- 📧 Email notifications
- 💬 Slack/Discord integration
- 📊 Interactive dashboard
- 🔄 API mocking and virtualization
- 🔒 Secure credential management
Installation
npm init playwright-bingoQuick Start
- Create a new project:
npm init playwright-bingo my-tests
cd my-tests- Add a new page:
bingo add -page Login- Run tests:
npm testCLI Commands
bingo add -page <name>: Create new page filesbingo delete -page <name>: Delete a pagebingo update -page <old> <new>: Rename a pagebingo add -env <name>: Add new environment
Project Structure
my-app/
├── pages/
│ ├── login.locators.js
│ ├── login.methods.js
│ └── login.steps.js
├── features/
│ └── login.feature
├── utils/
│ ├── pdfReporter.js
│ ├── envManager.js
│ └── aiHelper.js
├── reports/
├── config/
│ ├── bingo.config.js
│ ├── environments/
│ │ ├── qa.json
│ │ └── qa2.properties
├── .env
└── package.jsonConfiguration
Edit bingo.config.js to customize:
- AI integration
- Reporting options
- Self-healing settings
- Visual testing
- Mocking
- Dashboard
- Security settings
Self-Healing Locators
The framework extends Playwright's page.locator() with page.locators():
// Multiple locator strategies
await page.locators([
'#username',
'[name="username"]',
'[data-testid="username-input"]'
]).fill('testuser');PDF Reporting
Generate detailed PDF reports:
npm run pdf-reportEmail Reports
Configure email notifications in bingo.config.js:
reporting: {
email: {
enabled: true,
smtp: {
host: 'smtp.example.com',
port: 587,
secure: true,
auth: {
user: process.env.SMTP_USER,
pass: process.env.SMTP_PASS
}
}
}
}AI Integration
Enable AI features in bingo.config.js:
ai: {
enabled: true,
openaiApiKey: process.env.OPENAI_API_KEY,
locatorSuggestion: true,
testGeneration: true,
flakyTestDetection: true
}Contributing
- Fork the repository
- Create your feature branch
- Commit your changes
- Push to the branch
- Create a Pull Request
License
MIT
