A robust, production-grade UI automation framework built to validate core business workflows for a simulated E-Commerce platform (Automation Exercise).
This project was built from scratch using Playwright, TypeScript, and the Page Object Model (POM) architecture to ensure high scalability and easy maintenance.
- Page Object Model (POM): Strict separation of UI locators and test execution logic.
- Dynamic Test Data Management: Uses JavaScript
Date.now()to generate unique user profiles on-the-fly, allowing E2E registration tests to run seamlessly in parallel without data conflicts. - Continuous Integration (CI/CD): Integrated with GitHub Actions to automatically run tests in the cloud on every push or pull request.
- Time-Travel Debugging: Full support for Playwright's UI mode and trace viewer.
├── .github/workflows/ # CI/CD Pipeline Configuration
├── e2e/ # End-to-End Test Execution Scripts
│ └── e2e_checkout.spec.ts
├── pages/ # Page Object Classes (UI Locators & Methods)
│ ├── CartPage.ts
│ ├── CheckoutPage.ts
│ ├── HomePage.ts
│ ├── LoginPage.ts
│ ├── PaymentPage.ts
│ └── SignupPage.ts
├── docs/ # Documentation & Strategy
│ └── TestPlan.md
├── playwright.config.ts # Playwright Configuration
└── package.json # Dependencies & Scripts
- Node.js (v16 or higher)
- Clone the repository:
git clone https://github.com/Desh07/playwright-ecommerce-automation.git cd playwright-ecommerce-automation - Install Node dependencies:
npm install
- Install Playwright browsers:
npx playwright install --with-deps
Run tests in UI Mode (Recommended for debugging):
npx playwright test --uiRun tests in Headed Mode (Watch the browser):
npx playwright test --headedRun tests Headless (For CI/CD):
npx playwright test