Skip to content

Desh07/playwright-ecommerce-automation

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🛒 E-Commerce Web Automation Framework

Playwright Tests

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.

🚀 Key Features

  • 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.

🏗️ Architecture

├── .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

🛠️ Prerequisites

📦 Installation

  1. Clone the repository:
    git clone https://github.com/Desh07/playwright-ecommerce-automation.git
    cd playwright-ecommerce-automation
  2. Install Node dependencies:
    npm install
  3. Install Playwright browsers:
    npx playwright install --with-deps

🎮 Execution Commands

Run tests in UI Mode (Recommended for debugging):

npx playwright test --ui

Run tests in Headed Mode (Watch the browser):

npx playwright test --headed

Run tests Headless (For CI/CD):

npx playwright test

About

A production-grade UI automation framework built with Playwright, TypeScript, and the Page Object Model (POM) architecture, featuring dynamic test data management and GitHub Actions CI/CD integration.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors