A highly scalable, maintainable, and industry-standard End-to-End (E2E) automation framework built for the Music-Tech Shop e-commerce application.
Target App: https://music-tech-shop.vercel.app
This framework leverages Playwright with TypeScript to provide robust coverage for critical business flows including authentication, product discovery, cart management, and administrative functions. It follows the Page Object Model (POM) pattern and utilizes Fixtures for optimized setup and teardown.
- Phased Strategy: Incremental build from foundation to full regression.
- Role-Based Testing: Dedicated fixtures for Admin and Customer roles.
- Auth Reuse: Leveraging
storageStateto skip repetitive login steps. - Fluent POM: Readable, chainable page interactions.
- A11Y Integration: Structural accessibility snapshots via
toMatchAriaSnapshot. - Data Driven: Externalized test data in the
/datadirectory.
- Engine: Playwright
- Language: TypeScript
- Package Manager: pnpm
- Reporting: HTML Reporter + List Reporter
- CI/CD: GitHub Actions (ready)
tests/
e2e/ # Feature-based test suites
auth/ # Login & session management
products/ # Catalog, filtering, sorting
product-detail/ # Detail page interactions
cart/ # Shopping cart & orders
navigation/ # Navigation, accessibility, 404s
search/ # Search functionality
api-console/ # API Testing Console verification
pages/ # Page Object Model classes
fixtures/ # Custom Playwright fixtures (auth, pages)
data/ # Test data & constants
helpers/ # Utility & validation helpers
docs/ # Project documentation (Test Plan, Coverage Matrix)
- Clone the repository
- Install dependencies:
pnpm install
- Install Playwright browsers:
npx playwright install --with-deps chromium
| Suite | Command | Description |
|---|---|---|
| All Tests | pnpm test |
Runs the entire suite in headless mode |
| Smoke Suite | pnpm run test:smoke |
Runs critical path tests tagged with @smoke |
| Regression | pnpm run test:regression |
Runs the full regression suite tagged with @regression |
| Headed | pnpm run test:headed |
Runs tests with visible browser |
| Debug | pnpm run test:debug |
Opens Playwright Inspector for debugging |
| Report | pnpm run test:report |
Opens the last HTML report |
To manually refresh authentication states:
npx playwright test auth.setup| Route | Page Name | Status | Test Files |
|---|---|---|---|
/ |
Homepage | β Covered | main-navigation.spec.ts, accessibility.spec.ts |
/products |
Product listing | β Covered | product-catalog.spec.ts, product-catalog-extended.spec.ts |
/products?category=X |
Filtered listing | β Covered | product-catalog-extended.spec.ts |
/products/:id |
Product detail | β Covered | product-detail.spec.ts, product-detail-extended.spec.ts |
/login |
Login | β Covered | login.spec.ts, auth-session.spec.ts |
/cart |
Cart | β Covered | add-to-cart.spec.ts, cart-orders-extended.spec.ts |
/orders |
Orders | β Covered | cart-orders-extended.spec.ts |
/about |
About page | β Covered | informational-pages.spec.ts |
/contact |
Contact page | β Covered | contact-form.spec.ts, forms-negative.spec.ts |
/shipping |
Shipping info | β Covered | informational-pages.spec.ts, forms-negative.spec.ts |
/returns |
Returns & Warranty | β Covered | informational-pages.spec.ts |
/terms |
Terms & Conditions | β Covered | informational-pages.spec.ts |
/api-test |
API Console | β Covered | api-console.spec.ts |
| Feature | Description | Status | Suite(s) |
|---|---|---|---|
| Authentication | Login (Admin/Customer), Session persistence, Logout | β Full | Smoke, Regression |
| Product Catalog | Grid display, Categories, Sorting, Pagination | β Full | Smoke, Regression |
| Product Detail | Specs, Reviews, Image, Quantity, Related | β Full | Smoke, Regression |
| Shopping Cart | Add/Remove, Update quantity, Totals | β Full | Smoke, Regression |
| Orders | History display, Status indicators | β Full | Regression |
| Contact Form | Valid submission, Field validation, Negatives | β Full | Smoke, Regression |
| Shipping Calc | ZIP code logic, valid/invalid inputs | β Full | Regression |
| Search | Header search, Results page filtering | β Full | Regression |
| Navigation | Header/Footer links, Theme toggle | β Full | Smoke, Regression |
| Accessibility | Semantic structure, Landmarks, A11y snapshots | β Partial | Regression (@a11y) |
| Error Handling | 404 pages, Broken link redirects | β Full | Regression |
| Gap | Reason |
|---|---|
| User Registration | The application does not feature a registration flow; only pre-configured test accounts are used. |
| Checkout Flow | There is no dedicated checkout route in the current version of the application. |
| Payment Integration | Out of scope as the app is a demonstration platform without real payment processing. |
| Real Email Verification | Contact form submissions are verified at the UI level but actual email delivery is not tested. |
| Full WCAG Audit | Automated accessibility tests cover structural and semantic basics, but do not replace a full manual audit. |
- Naming Conventions:
- Tests:
<feature>.spec.ts - POMs:
<name>.page.ts - Helpers:
<name>.helper.ts
- Tests:
- Locator Strategy: Prioritize role-based locators (
getByRole,getByLabel,getByText). Avoid CSS/XPath. - Assertions: Use web-first assertions (
await expect(locator).toHaveText()). - DRY Principle: Never duplicate a locator string; update the appropriate Page Object.
- Full Test Plan β Detailed strategy and phasing.
- CLAUDE.md β AI assistant guide for working with this codebase.
- AGENTS.md β AI assistant guide for working with this codebase.
- Weekly Review: Check for flakiness and update dependencies.
- Reporting: Traces are captured on the first retry for easier failure investigation.
- Screenshots/Videos: Disabled by default to keep CI lean; rely on traces for post-mortems.
- Name:
Douglas Urrea Ocampo - Job:
SDET - Software Developer Engineer in Test - Country:
Colombia - City:
Medellin - E-mail:
douglas@douglasfugazi.co - LinkedIn: https://www.linkedin.com/in/douglasfugazi
- Contact: https://douglasfugazi.co
This project is licensed under the MIT License - see the LICENSE file for details.
Built with β€οΈ by Douglas Urrea Ocampo for the QA Community.
