Skip to content

rincy-r3876/DemoBlazePlaywrightPOMProject

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

5 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

DemoBlazePlaywrightPOMProject

A beginner-friendly Playwright automation project implementing Page Object Model for testing Demoblaze e-commerce workflows.

๐Ÿš€ DemoBlaze Playwright Automation Framework (POM Architecture)

An end-to-end UI automation framework built using Playwright and JavaScript, implementing the Page Object Model (POM) design pattern.

This project demonstrates scalable test architecture, CI integration, and automation best practices for modern web applications.

๐Ÿ”— Application Under Test: https://www.demoblaze.com

๐Ÿ“– Overview

This framework automates core user flows of the DemoBlaze e-commerce application, focusing on:

Authentication validation UI visibility checks Session handling (Login / Logout) Stable locator strategies CI-based automated execution

The framework is designed to be:

โœ… Scalable โœ… Maintainable โœ… CI/CD Ready โœ… Industry-standard compliant

๐Ÿ—๏ธ Architecture & Design Pattern ๐Ÿ”น Page Object Model (POM)

Each page is abstracted into a reusable class that:

โœ…Encapsulates locators โœ…Encapsulates page actions โœ…Improves readability โœ…Reduces duplication โœ…Enhances maintainability

This approach ensures clean separation between:

Test Logic Page Interactions

Configuration

๐Ÿ“‚ Project Structure DemoBlazePlaywrightPOMProject โ”‚ โ”œโ”€โ”€ .github/workflows/ โ”‚ โ””โ”€โ”€ playwright.yml # CI pipeline configuration โ”‚ โ”œโ”€โ”€ pages/ # Page Object Classes โ”‚ โ”œโ”€โ”€ LoginPage.js โ”‚ โ””โ”€โ”€ HomePage.js โ”‚ โ”œโ”€โ”€ tests/ # Test Specifications โ”‚ โ”œโ”€โ”€ LoginTest.spec.js โ”‚ โ””โ”€โ”€ HomePageTest.spec.js โ”‚ โ”œโ”€โ”€ playwright.config.js # Playwright configuration โ”œโ”€โ”€ package.json โ”œโ”€โ”€ package-lock.json โ””โ”€โ”€ README.md

๐Ÿ› ๏ธ Tech Stack Tool Purpose โœ…Playwright UI Automation โœ…JavaScript Test scripting โœ…Node.js Runtime environment โœ…GitHub Actions CI/CD โœ…HTML Reporter Test reporting

โš™๏ธ Setup & Installation

1๏ธโƒฃ Clone Repository git clone https://github.com/rincy-r3876/DemoBlazePlaywrightPOMProject.git cd DemoBlazePlaywrightPOMProject

2๏ธโƒฃ Install Dependencies npm install

3๏ธโƒฃ Install Playwright Browsers npx playwright install

4๏ธโƒฃ Execute Tests npx playwright test

5๏ธโƒฃ View Test Report npx playwright show-report

๐Ÿงช Test Coverage โœ” Login Feature

Successful login validation Welcome username visibility Session validation โœ” Home Page Feature Logout link visibility Post-login UI validation

๐Ÿ”„ Continuous Integration (CI)

This project integrates with GitHub Actions to automatically: Install dependencies Install Playwright browsers Execute test suite Generate reports

Fail build if:

Tests fail .only is committed (via forbidOnly)

Workflow file:

.github/workflows/playwright.yml

CI ensures production-ready code quality and prevents accidental test isolation.

๐Ÿ” Production-Safe Configuration

The framework uses:

forbidOnly: !!process.env.CI

This prevents accidental commits of:

test.only() describe.only()

Ensuring:

Full test suite always runs in CI No partial test execution in production pipelines

๐Ÿš€ Key Automation Best Practices Implemented

Page Object Model (POM) Explicit waits over hard waits Centralized configuration CI-driven execution Clean locator strategies Structured test organization Scalable folder architecture

๐Ÿ“ˆ Scalability Potential

This framework can be extended to include:

Data-driven testing API integration testing Parallel cross-browser execution Docker containerization Advanced reporting (Allure) Environment-based configurations Test tagging & selective execution

๐Ÿ‘ฉโ€๐Ÿ’ป Author

Rincy Mol R QA | Playwright Enthusiast

About

๐Ÿš€ DemoBlaze Playwright Automation Framework (POM Architecture) An end-to-end UI automation framework built using Playwright and JavaScript, implementing the Page Object Model (POM) design pattern. This project demonstrates scalable test architecture, CI integration, and automation best practices for modern web applications.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors