No results found.

Delivery Velocity June 2024

Centralised Playwright E2E Framework

A shared Playwright test framework with per-store override layers — core checkout, account, and catalogue suites inherited by every client store on day one, with store-specific extensions layered on top.

Every store
Day-one coverage
Per-PR
CI integration
<10 min
Suite runtime

The Problem

Running a Magento agency means managing multiple client stores simultaneously, each with its own checkout configuration, theme customisations, and third-party integrations. Building end-to-end test suites from scratch per client is prohibitively expensive. Not having them is worse — regressions in checkout, account, or catalogue flows are high-impact and high-visibility failures.

The common workaround is to build test coverage gradually over time, store by store. In practice, this means most stores have either no coverage or thin coverage for months after launch, and coverage quality varies depending on which engineer built the tests.

The Solution

A shared Playwright E2E framework with a core test library and a per-store override and extension layer. Core suites cover the critical paths that are common to all Magento stores. Each store gets a thin configuration layer that handles store-specific variables and can extend or override core behaviour where needed.

Framework Structure

core/
  tests/
    checkout/
      guest.spec.ts         # Guest checkout end-to-end
      registered.spec.ts    # Logged-in customer checkout
      multistep.spec.ts     # Multi-address and edge cases
    account/
      register.spec.ts
      login.spec.ts
      orders.spec.ts
    catalog/
      browse.spec.ts
      search.spec.ts
      pdp.spec.ts
  fixtures/
    products.ts             # Shared test data helpers
    customers.ts
    addresses.ts

stores/
  client-a/
    config.ts               # Store URL, credentials, locale
    overrides/              # Modified core test behaviour
    custom/                 # Tests unique to this store
  client-b/
    ...

Every test run uses the store’s config layer automatically. Test parameterisation handles multi-locale and multi-currency configurations without requiring separate test files.

CI Integration

The framework runs on every PR targeting a managed store’s staging environment. Failures block merge. The CI job runs the affected store’s full suite, with parallel worker execution keeping wall-clock time under 10 minutes for most stores. The checkout suite — the highest-value test — runs first, so a regression in the critical path fails fast.

Seeded Test Data

Playwright tests run against anonymised production data rather than synthetic fixtures. Real product catalogues, real address formats, real order histories — tests that pass on synthetic data sometimes fail on real data shapes. Seeding from the anonymised production dump closes this gap.

How New Stores Inherit Coverage

When a new client store is onboarded:

  1. Store config layer created from a template
  2. Core suite pointed at the new staging environment
  3. Store-specific overrides added for any non-standard checkout flows
  4. CI job added to the store’s pipeline

Total time to working E2E coverage for a standard Magento store: under half a day. Previously, this would take weeks of iterative test authoring — and might never reach full checkout coverage if the project ran short on time.

Impact

New client stores have regression protection for their critical user journeys from day one. The cumulative effect across the portfolio is significant — checkout regressions that would previously reach production are caught in CI, with the frequency increasing as each store’s custom test layer expands.

The framework has also improved confidence in deployments. Engineers release more willingly when CI is green across checkout, account, and catalogue flows. The number of post-deploy rollbacks caused by undetected regressions has dropped.