Cypress → Playwright
mediumPlaywright offers faster execution, multi-browser support, and free CI reporting. API is different from Cypress but concepts map well. Microsoft-backed with consistent releases.
Estimated: 4-8h · 5 steps
Progress0%
Step 1: Install Playwright
npm init playwright@latest
Step 2: Convert test structure
describe/it → test.describe/test. cy.visit() → page.goto(). cy.get() → page.locator(). cy.contains() → page.getByText().
Step 3: Convert assertions
cy.should('be.visible') → await expect(locator).toBeVisible(). Playwright uses async/await everywhere — no Cypress chaining.
Step 4: Migrate fixtures and commands
Cypress custom commands → Playwright fixtures and page object models. beforeEach → test.beforeEach with async.
Step 5: Configure CI
Playwright has built-in CI config. GitHub Actions: npx playwright install --with-deps && npx playwright test.
✓ All E2E tests pass in Chromium, Firefox, and WebKit. HTML report generates.