
Security News
npm Adopts OIDC for Trusted Publishing in CI/CD Workflows
npm now supports Trusted Publishing with OIDC, enabling secure package publishing directly from CI/CD workflows without relying on long-lived tokens.
playwright-bingo
Advanced tools
A powerful testing framework built on top of Playwright and Cucumber, designed to make end-to-end testing more efficient and maintainable
A powerful and user-friendly test automation framework built on Playwright and Cucumber.js, designed to make test automation easy and efficient.
Visit our official documentation site for comprehensive guides and resources.
Section | Description |
---|---|
šÆ Getting Started | Quick start guide and installation instructions |
š Guides | Detailed tutorials and how-to guides |
š API Reference | Complete API documentation and examples |
š” Best Practices | Recommended patterns and tips |
š Examples | Real-world examples and use cases |
š” Pro Tip: Bookmark the documentation site for quick reference while working with Playwright Bingo.
npm install -g playwright-bingo
bingo init
npm install
npx playwright install
# Run all tests
npm test
# Run tests in parallel
npm run test:parallel
# Generate HTML report
npm run test:report
# Add a new page
bingo add page <pageName>
# Delete a page
bingo delete page <pageName>
# Update page name
bingo update page <oldName> <newName>
# Mask sensitive data
bingo mask <data>
# Unmask data
bingo unmask <maskedData>
playwright-bingo/
āāā features/ # Cucumber feature files
ā āāā todo.feature # Example Todo feature file
āāā lib/ # Core framework files
ā āāā index.js # Main framework exports
ā āāā locators.js # Locator management
ā āāā page.manager.js # Page object management
ā āāā utils/ # Utility functions
ā āāā data-masker.js # Data masking utilities
ā āāā properties.js # Properties file handling
āāā pages/ # Page objects
ā āāā actions/ # Page actions
ā ā āāā index.js # Actions exports
ā ā āāā todo.actions.js # Todo page actions
ā āāā locators/ # Page locators
ā āāā index.js # Locators exports
ā āāā todo.locators.js # Todo page locators
āāā step-definitions/ # Cucumber step definitions
ā āāā todo.steps.js # Todo feature steps
āāā support/ # Support files
ā āāā env-setup.js # Environment configuration
ā āāā hooks.js # Cucumber hooks
ā āāā world.js # Custom world setup
āāā tests/ # Test files
ā āāā todo.test.js # Example test file
āāā .env # Environment variables
āāā .gitignore # Git ignore file
āāā bingo.config.js # Framework configuration
āāā cucumber.js # Cucumber configuration
āāā generate-report.js # HTML report generation
āāā jsconfig.json # JavaScript configuration
āāā package.json # Project dependencies
āāā README.md # Project documentation
module.exports = {
selfHealing: {
enabled: true,
maxTimeout: 5000,
retryInterval: 1000,
maxRetries: 3
},
locators: {
defaultTimeout: 30000,
waitForTimeout: 5000
},
browser: {
headless: true,
slowMo: 50
},
reporting: {
screenshots: {
onFailure: true,
onSuccess: false
},
videos: {
enabled: true,
retainOnFailure: true
}
},
dataMasking: {
enabled: true,
properties: {
autoMask: true,
sensitiveKeys: [
'password',
'secret',
'key',
'token',
'credential',
'apiKey',
'auth',
'private'
]
}
}
};
The framework includes a powerful data masking system to protect sensitive information in your tests.
.env
file in your project root:BINGO_MASK_SALT=your-secret-salt
TEST_EMAIL=test@example.com
TEST_PASSWORD=your-password
bingo mask test@example.com
.env
file:TEST_EMAIL=BINGO_MASK_<hash>
const { env } = require('playwright-bingo');
// Access environment variables (automatically decrypted)
console.log(env.TEST_EMAIL); // Shows original value
The framework can automatically mask sensitive values in .properties
files:
bingo.config.js
:module.exports = {
dataMasking: {
enabled: true,
properties: {
autoMask: true,
sensitiveKeys: [
'password',
'secret',
'key',
'token',
'credential',
'apiKey',
'auth',
'private'
]
}
}
};
const { properties } = require('playwright-bingo');
// Load properties with automatic masking
properties.load('path/to/properties.file', true);
// Get masked value
const maskedValue = properties.get('db.password');
// Get original value
const originalValue = properties.get('db.password', true);
// Save masked properties to a new file
properties.save('path/to/masked.properties', true);
The system automatically detects and masks sensitive data types:
const { debug } = require('playwright-bingo');
// Show all masked values and their originals
debug();
The framework includes a powerful self-healing mechanism that automatically recovers from locator failures by trying alternative locators.
// pages/locators/todo.locators.js
class TodoLocators {
constructor(page) {
this.page = page;
// Define multiple locators for the same element
this.todoInput = [
'input[placeholder="What needs to be done?"]',
'input.new-todo',
'[data-testid="todo-input"]'
];
}
}
// pages/actions/todo.actions.js
class TodoActions {
constructor(bingoPage) {
this.bingoPage = bingoPage;
this.todo = new LocatorManager(bingoPage.page).todo;
}
async addTodoItem(todoText) {
// The framework will try each locator until one works
const input = await this.bingoPage.waitForElement(this.todo.todoInput);
await input.fill(todoText);
await input.press('Enter');
}
}
HTML reports are generated automatically after test execution:
npm run test:report
Reports include:
Contributions are welcome! Please feel free to submit a Pull Request.
This project is licensed under the MIT License - see the LICENSE file for details.
FAQs
A powerful testing framework built on top of Playwright and Cucumber, designed to make end-to-end testing more efficient and maintainable
The npm package playwright-bingo receives a total of 0 weekly downloads. As such, playwright-bingo popularity was classified as not popular.
We found that playwright-bingo demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago.Ā It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
npm now supports Trusted Publishing with OIDC, enabling secure package publishing directly from CI/CD workflows without relying on long-lived tokens.
Research
/Security News
A RubyGems malware campaign used 60 malicious packages posing as automation tools to steal credentials from social media and marketing tool users.
Security News
The CNA Scorecard ranks CVE issuers by data completeness, revealing major gaps in patch info and software identifiers across thousands of vulnerabilities.