How svsatish/hybrid-playwright-framework works
Project type and purpose
• This is a full-stack test automation framework built in TypeScript using Playwright.
• It supports UI tests (browser automation), API tests (HTTP requests), and hybrid flows combining both.
• Key goals: POM structure, dynamic test data, logging, Allure reporting, CI/CD via GitHub Actions, optional Docker packaging.
File structure
• Top-level:
• .github/workflows/playwright.yml → CI pipeline
• Dockerfile → containerizes the test runner
• playwright.config.ts, global-setup.ts → test runner configuration and environment metadata
• tsconfig.json → TypeScript compilation
• package.json → scripts and dependencies
• src/:
• config/env.ts → environment variables loader
• fixtures/ → static JSON fixtures
• pages/ → Playwright Page Object Models
• tests/api, tests/ui, tests/hybrid → separation of test types
• utils/logger.ts, utils/testUserGenerator.ts → logging and dynamic data
• test-results/ & reports/logs folders → artifacts (videos, error contexts, Allure history)
README for additional insights
• Architectural principles:
• Page Object Model for UI abstractions
• Layered tests: pure UI, pure API, hybrid
• Central config and environment metadata injection
• Pluggable reporting (Allure), logging (log4js)
• CI/CD pipeline that installs, runs tests headless, collects results, publishes reports
• Docker to run tests in a controlled environment