It logs into your app, clicks through every feature, and tells you what broke before your customer does.
Features β’ Quick Start β’ Configuration β’ Documentation
A customer demo fails for the dumbest reasons: an API key expired overnight, a feature flag flipped, the seed data got wiped. Nobody notices until you're sharing your screen.
So I built a robot that does the boring check for you. It logs in (OAuth, MFA, the works), walks through every feature on a schedule, screenshots the evidence, scores each screen, and pings Slack the moment something stops working. By the time you open the demo, you already know it's green.
This is the framework behind a validation engine I run across 29 features of a real product.
- π Auto Login - Handles OAuth, MFA/TOTP, session management
- π§ Smart Navigation - Declarative routing with fallbacks
- πΈ Evidence Capture - Screenshots with annotations
- β Validation Engine - Check elements, data, API responses
- π‘οΈ Content Scanner - Bilingual profanity/gaffe/PII shield for demo safety
- π Alerting - Slack, email, webhooks on failure
- π Reporting - Excel/JSON reports with history
- β° Scheduling - Run daily, hourly, or on-demand
- Python 3.9+
- Chrome browser
- Playwright
# Clone the repository
git clone https://github.com/thiagoger/playwright-feature-validator.git
cd playwright-feature-validator
# Create virtual environment
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
# Install dependencies
pip install -r requirements.txt
# Install Playwright browsers
playwright install chromium# Copy environment template
cp .env.example .env
# Edit .env with your credentials
# Then run:
feature-validator run --product example --project demoflowchart LR
Config[Config<br/>JSON] --> Auth[Auth<br/>OAuth + MFA]
Auth --> Nav[Navigate<br/>routing]
Nav --> Check[Validate<br/>checks]
Check --> Rep[Reporter<br/>screenshots + Excel]
Check --> Scan[Content Scanner<br/>profanity / PII / gaffes]
Rep --> Alert[Alerter<br/>Slack / email]
Scan --> Alert
Define your product in config/products/:
{
"name": "ExampleApp",
"base_url": "https://app.example.com",
"auth": {
"type": "oauth_totp",
"login_url": "/sign-in"
},
"projects": {
"demo": {
"companies": ["Acme", "Globex", "Initech"]
}
}
}Define checks in config/checks/:
{
"product": "ExampleApp",
"checks": [
{
"id": "login-works",
"name": "Login Works",
"type": "auth",
"priority": "critical",
"expect": {
"url_contains": "/homepage"
}
},
{
"id": "customers-exist",
"name": "Customers Have Data",
"type": "navigation",
"priority": "high",
"route": "/app/customers",
"expect": {
"selector": "[data-testid='customer-row']",
"min_count": 1
}
}
]
}# Run all checks for a product
feature-validator run --product example
# Run specific project
feature-validator run --product example --project demo
# Run single check
feature-validator run --product example --check login-works
# Dry run (no screenshots, no alerts)
feature-validator run --product example --dry-run
# Generate report only
feature-validator report --product example --format excel
# List available checks
feature-validator list --product example| Type | Description | Example |
|---|---|---|
auth |
Validate login works | Login β expect homepage |
navigation |
Navigate and validate | Go to page β check element exists |
content_scan |
Scan page for profanity/PII/gaffes | Navigate β scan text β flag violations |
api |
Call API endpoint | GET /health β expect 200 |
data |
Validate data exists | Query β expect count >= N |
ui |
Check UI element | Find element β validate text |
Configure alerts in .env:
# Slack
SLACK_WEBHOOK_URL=https://hooks.slack.com/services/xxx
SLACK_CHANNEL=#demo-health
# Email
SMTP_HOST=smtp.gmail.com
SMTP_PORT=587
ALERT_EMAIL=team@company.com| Document | Description |
|---|---|
| Getting Started | Installation and first run |
| Adding Checks | How to write a new check |
playwright-feature-validator/
βββ src/feature_checker/
β βββ cli.py # Command-line interface
β βββ core/
β β βββ checker.py # Main check orchestrator
β β βββ browser.py # Browser management
β β βββ content_scanner.py # Profanity/PII/gaffe detection
β β βββ reporter.py # Report generation
β βββ auth/
β β βββ login.py # Login handlers
β β βββ totp.py # TOTP generation
β βββ navigation/
β β βββ navigator.py # Page navigation
β βββ utils/
β βββ screenshot.py # Screenshot capture
β βββ config.py # Configuration loader
βββ config/
β βββ checks/ # Check definitions
β βββ products/ # Product configurations
βββ docs/ # Documentation
pip install -e . pytest
pytest -qCovers the pure-logic core: TOTP generation (checked against the RFC 6238 reference vector) and the content scanner's profanity, placeholder, and PII detection across sensitivity levels. CI runs it on Python 3.10 to 3.12 on every push.
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing) - Commit changes (
git commit -m 'Add amazing feature') - Push to branch (
git push origin feature/amazing) - Open a Pull Request
MIT License - see LICENSE for details.
Built and maintained by Thiago Rodrigues
