Skip to content

Mukuldev21/BOSCH-POWER-TOOLS-Playwright-Sol

Repository files navigation

🛠️ Bosch Power Tools - Test Automation Framework

Playwright TypeScript Allure

📖 Overview

This repository hosts an Enterprise-Grade End-to-End (E2E) Test Automation Framework for the Bosch Power Tools application. Built on Playwright and TypeScript, it is designed for scalability, reliability, and ease of maintenance.

The framework adheres to strict Page Object Model (POM) architecture to ensure separation of concerns and reusability of code. It integrates resilient testing patterns (polling assertions, auto-waiting) to handle dynamic web elements effectively.


🚀 Key Features

  • Page Object Model (POM): Modularized page classes (pages/*.ts) encapsulate locators and interactions, keeping tests clean and readable.
  • Robustness: Utilizes expect.poll and auto-waiting mechanisms to eliminate flaky tests (e.g., Search Auto-suggest).
  • Enterprise Reporting: Integrated Allure Reports provide detailed execution history, screenshots on failure, and trend analysis.
  • Smart Execution: Custom script-driven execution allowing simple commands to run specific tests or entire suites.
  • Synchronized Test Plan: 1:1 mapping between testplan.md categories and test file structures.

🏗️ Directory Structure

BOSCH Power Tools/
├── 📂 pages/              # 🏗️ Page Objects (Locators + Actions)
│   ├── Homepage.ts        # Landing page logic
│   ├── Searchpage.ts      # Search & Filtering logic
│   └── ...
├── 📂 tests/              # 🧪 Test Specifications (*.spec.ts)
│   ├── navtest.spec.ts    # 📱 Navigation & Layout
│   ├── productsearch.spec.ts # 🔍 Search Functionality
│   └── ...
├── 📂 scripts/            # ⚙️ Custom Utility Scripts
│   └── run-tests-with-report.js
├── 📂 allure-results/     # 📊 Raw Test Data (Auto-cleaned)
├── 📂 allure-report/      # 📈 HTML Report (Auto-generated)
├── 📄 playwright.config.ts # 🔧 Framework Configuration
└── 📄 testplan.md         # 📋 Master Test Plan

⚡ Getting Started

Prerequisites

  • Node.js: v14+
  • npm: v6+

Installation

  1. Clone the repository:
    git clone <repository_url>
  2. Install dependencies:
    npm install
  3. Install Playwright Browsers:
    npx playwright install

🧪 Running Tests

We have simplified test execution into a single, smart command.

1. Run All Tests

Executes the full suite, cleans old reports, generates a new report, and opens it automatically.

npm run test

2. Run Specific Tests (Smart Filter)

Run a specific test case by ID or Title. The script automatically detects the string and filters for it.

npm run test "MANUAL-001"
# OR
npm run test "Search Functionality"

3. Run Specific Test Files

Pass the file path directly.

npm run test tests/navtest.spec.ts

🏷️ Test Categories (from Test Plan)

Tests are organized strictly according to testplan.md:

Category Description
📱 Navigation & Layout Homepage integrity, menu navigation, responsiveness.
🔍 Search Functionality Keyword search, auto-suggest, filtering, empty states.
📦 Product Details Page (PDP) Product specs, image loading, cross-selling accessories.
🛠️ Service & Support Repair booking, dealer locator functionality.
📍 Store Locator Map loading and "Where to Buy" flows.
🛡️ Warranty & Manuals Warranty details and documentation access.

📊 Reporting

We use Allure for rich reporting.

  • Reports are automatically generated and opened after every npm run test execution.
  • If you need to manually view the last report:
    npm run report:open

🤝 Contribution Guidelines

  1. Update Page Objects: Always add new locators/methods to pages/ classes, never directly in tests.
  2. Sync Test Plan: If adding a new test, first update testplan.md and then create the test with a matching ID.
  3. Doc-Comments: Add JSDoc comments to page methods indicating which Test ID consumes them.

Author: Mukul | QA Automation Engineer

About

End-to-End Testing Framework for Bosch Tools US Website

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors