How dannyjho/e2e-testing-playwright works
Project type and purpose
• This is an end-to-end (E2E) testing framework built with Playwright and TypeScript.
• Its goal is to validate user flows (login via various methods, adding items to cart) against a target web application, generate Allure test reports, and deploy those reports to GitHub Pages via GitHub Actions.
File structure
Top-level:
• .github/workflows/playwright.yml – CI/CD definition
• package.json / package-lock.json – npm dependencies & scripts
• playwright.config.ts / tsconfig.json – Playwright and TS config
• tests/ – all test code
– helpers/ – reusable flow abstractions (loginFlow, setLocaleToTaiwan)
– login/ – group of login-related specs
Patterns:
• Modular test helpers factor out common sequences
• Spec files under domain folders (login, cart) follow Playwright’s test runner conventions
• CI pipeline installs dependencies, runs tests, publishes reports
Extract insights from the README
• Tech stack: Playwright + TS, Allure for reporting, GitHub Actions for CI, GitHub Pages for hosting reports
• Workflow: on push to main → install deps → npx playwright install → run tests with Allure reporter → build & deploy report to gh-pages
Main components
a. Local Development Environment
• Developer machine with Node.js & Playwright CLI
• Tests folder (helpers + specs)
b. CI/CD Pipeline (GitHub Actions)
• Checkout repo
• npm install
• npx playwright install
• npx playwright test --reporter=line,allure-playwright
• allure generate & allure publish to gh-pages
c. Playwright Test Runner
• Browser drivers (Chromium/Firefox/WebKit)
• Test scripts invoke browser contexts, pages, selectors
d. Allure Reporter
• Collects test results, artifacts (screenshots, videos, logs)
• Generates static HTML report
e. GitHub Pages (gh-pages branch)
• Hosts the generated Allure report
Relationships and interactions
• Developer commits code → pushes to GitHub
• GitHub triggers Actions workflow → spins up runner → installs Node & Playwright browsers
• Workflow executes Playwright Test Runner against target web application URL(s)
• Tests leverage helpers to drive login / cart flows in browser instances
• Allure Reporter hooks capture results & artifacts → output report files
• Workflow pushes report to gh-pages branch → published on GitHub Pages
• Optionally: Developer can run same steps locally and serve report via Allure CLI
Architectural patterns & design principles
• Modularization: helpers vs specs
• Single source of truth for CI/CD in YAML
• Separation of concerns: test orchestration (CI) vs test implementation (Playwright code) vs reporting (Allure) vs hosting (Pages)
• Infrastructure as code: workflow configuration versioned alongside tests
What to capture in detail
• The sequence of CI steps and which config file drives each step (playwright.config.ts, tsconfig.json, yarn/npm scripts)
• How helpers are invoked by spec files
• Where test artifacts (screenshots, traces) are stored and how Allure picks them up
• How the workflow publishes to gh-pages