You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A production-ready end-to-end testing framework combining Playwright for Microsoft Edge automation with Cucumber.js for Behavior-Driven Development (BDD). Built for enterprise-level testing with comprehensive reporting, CI/CD integration, visual evidence capture, and containerized execution.
Perfect for teams seeking robust, maintainable, and scalable test automation solutions.
Enterprise Features
CI/CD Ready
GitHub Actions Pipeline - Complete automation workflow with multi-node testing
Docker Containerization - Consistent execution environment across platforms
Microsoft Edge Support - Edge-first browser configuration ready for execution
Headless/Headed Modes - Automatic environment detection and optimization
Parallel Execution - Fast feedback cycles with configurable worker threads
Scheduled Runs - Daily automated testing at 2 AM UTC
Advanced Reporting System
Allure Reports - Interactive dashboards with trends and analytics
Spark Reports - Modern responsive HTML reports with metadata
Multiple Format Reports - Comprehensive test documentation
GitHub Pages Deployment - Automatic report publishing and history
JSON Reports - Machine-readable format for further processing
Visual Evidence Capture
Automatic Video Recording - Complete test execution capture (HD 1280x720)
Clean Video Naming - Descriptive filenames matching test scenario names
Failure Screenshots - Smart capture on test failures only
Allure Integration - Visual artifacts embedded in reports
CI Artifact Preservation - 30-day evidence retention in GitHub Actions
Organized Storage - Structured file naming and directory organization
Technical Excellence
ES Modules Support - Modern JavaScript with import/export syntax
Page Object Model - Maintainable and reusable UI interactions
API Testing Integration - Combined UI and API test automation
# Run all tests with visible browser
npm test# Run tests with comprehensive reports
npm run test:reports
CI/Production Mode (Headless)
# Run tests in headless mode (CI simulation)
npm run test:ci
# Run tests in headless mode with reports
npm run test:ci:reports
Docker Execution
# Build and run in Docker container
docker-compose up --build
# Build Docker image manually
docker build -t playwright-cucumber .
docker run --rm -v $(pwd)/reports:/app/reports playwright-cucumber
Test Reports
Available Report Formats
Report Type
Purpose
Access
Allure
Interactive dashboards with trends
npm run open:allure
Spark
Modern responsive HTML reports
reports/spark-report/
Advanced HTML
Detailed multi-page documentation
reports/advanced-cucumber-report/
Multiple Cucumber
Comprehensive overview
reports/multiple-cucumber-report/
JSON
Machine-readable data
reports/cucumber_report.json
Report Generation Commands
# Generate all report formats
npm run generate:reports
# Generate specific report types
npm run generate:allure # Allure interactive reports
npm run generate:spark # Spark HTML reports
npm run generate:advanced # Advanced HTML reports# Open Allure report in browser
npm run open:allure
# Clean all generated reports
npm run clean:reports
Report Features
Trend Analysis - Historical test performance tracking
Test Metrics - Pass/fail rates, execution times, flaky tests
Visual Evidence - Screenshots and videos embedded in reports
Mobile Responsive - Reports viewable on any device
Artifact Collection: Videos, screenshots, and reports preserved
Report Deployment: Automatic publishing to GitHub Pages
Notifications: Success/failure status reporting
Pipeline Features
# Triggerson:
push: [main, develop]pull_request: [main, develop]schedule: '0 2 * * *'# Daily at 2 AM UTC
Environment Variables
Variable
Purpose
Default
CI
Enable headless mode
true in CI
NODE_ENV
Environment setting
test in CI
PARALLEL
Worker threads
2
Docker Configuration
** Multi-stage builds** for optimized image size
Security scanning with non-root user execution
Alpine base for minimal footprint
** Health checks** for container monitoring
Report serving with optional nginx container
Usage Examples
Writing Tests
Feature File (BDD)
Feature: User Login
As a user
I want to login to the application
So that I can access my dashboard
Scenario: Successful login with valid credentialsGiven I am on the login page
When I enter valid credentials
Then I should see the dashboard
And I should see a welcome message
Step Definitions
import{Given,When,Then}from'@cucumber/cucumber';import{expect}from'chai';Given('I am on the login page',asyncfunction(){awaitglobal.page.goto('https://example.com/login');});When('I enter valid credentials',asyncfunction(){awaitglobal.page.fill('[data-qa="username"]','testuser@example.com');awaitglobal.page.fill('[data-qa="password"]','SecurePass123');awaitglobal.page.click('[data-qa="login-button"]');});Then('I should see the dashboard',asyncfunction(){awaitexpect(global.page.url()).to.include('/dashboard');});
# Development (headed mode with debugging)
NODE_ENV=development npm test# Staging environment
NODE_ENV=staging npm run test:ci
# Production validation
NODE_ENV=production npm run test:ci:reports
Performance Metrics
Mode
Execution Time
Browser
Memory Usage
Use Case
Development
~1m34s
Headed
~400MB
Local debugging
CI Headless
~1m04s
Headless
~200MB
Automated testing
Docker
~1m10s
Headless
~150MB
Containerized CI
Best Practices
Test Organization
** Feature-based structure** - Group tests by business functionality
Company: TechCorp E-Commerce Solutions
Domain: Online Retail Platform
Team Size: 5 QA Engineers, 8 Developers
Timeline: 3-month implementation
Testing Scope: 150+ test scenarios across web and mobile
Business Challenge
TechCorp needed to automate their manual testing process for a complex e-commerce platform with:
Multiple user flows: Registration, login, product browsing, cart management, checkout
Payment integrations: PayPal, Stripe, bank transfers
Browser coverage: Microsoft Edge (primary)
Mobile responsiveness: iOS Safari, Android webview checks
API dependencies: User management, inventory, payment processing
Solution Implementation
Phase 1: Framework Setup (Week 1-2)
# Initial setup and team training
git clone https://github.com/techcorp/ecommerce-automation
cd ecommerce-automation
npm install
npx playwright install
# Team training sessions on BDD and Page Object Model
npm run test -- --tags @smoke
Phase 2: Test Development (Week 3-8)
# Example: Critical user journey automationFeature: Complete Purchase Journey
As a customer
I want to complete a purchase
So that I can receive my products
@critical@smokeScenario: Successful purchase with credit cardGiven I am a registered user
And I have items in my cart
When I proceed to checkout
And I enter valid payment details
Then my order should be confirmed
And I should receive an order confirmation email
Phase 3: CI/CD Integration (Week 9-10)
# GitHub Actions pipeline for continuous testingname: E-Commerce Test Suiteon:
push: [main, develop]pull_request: [main]schedule: '0 2,14 * * *'# 2 AM and 2 PM dailyjobs:
smoke-tests:
runs-on: ubuntu-lateststeps:
- uses: actions/checkout@v3
- name: Run Smoke Testsrun: npm run test:ci -- --tags @smokeregression-tests:
runs-on: ubuntu-latestneeds: smoke-testsif: success()steps:
- name: Full Regression Suiterun: npm run test:ci:reports
This case study demonstrates that the Playwright-Cucumber framework is not just a testing tool, but a complete solution for enterprise-grade test automation that delivers measurable business value and ROI.
Support
Getting Help
Documentation - Check this README and inline comments
Issues - Create GitHub issues for bugs and feature requests
Discussions - Use GitHub Discussions for questions
Contact - Reach out to maintainers for urgent issues
Reporting Issues
When reporting issues, please include:
Version information (Node.js, npm, Playwright)
Operating system and version
Steps to reproduce the problem
Expected vs actual behavior
Error logs and stack traces
Screenshots/videos if UI-related
Happy Testing! Built for reliable, maintainable test automation.