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.
- Page Object Model (POM): Modularized page classes (
pages/*.ts) encapsulate locators and interactions, keeping tests clean and readable. - Robustness: Utilizes
expect.polland 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.mdcategories and test file structures.
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
- Node.js: v14+
- npm: v6+
- Clone the repository:
git clone <repository_url>
- Install dependencies:
npm install
- Install Playwright Browsers:
npx playwright install
We have simplified test execution into a single, smart command.
Executes the full suite, cleans old reports, generates a new report, and opens it automatically.
npm run testRun 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"Pass the file path directly.
npm run test tests/navtest.spec.tsTests 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. |
We use Allure for rich reporting.
- Reports are automatically generated and opened after every
npm run testexecution. - If you need to manually view the last report:
npm run report:open
- Update Page Objects: Always add new locators/methods to
pages/classes, never directly in tests. - Sync Test Plan: If adding a new test, first update
testplan.mdand then create the test with a matching ID. - Doc-Comments: Add JSDoc comments to page methods indicating which Test ID consumes them.
Author: Mukul | QA Automation Engineer