Skip to content

[Feature]: Server-side HAR recording and replay for SSR applications #37679

@mvasin

Description

@mvasin

🚀 Feature Request

Add the ability to record and replay HAR files for HTTP requests made during server-side rendering (SSR) in Node.js applications, not just browser-level requests. This would enable comprehensive E2E testing of modern frameworks like Next.js, Remix, and SvelteKit where the majority of API calls happen in the Node.js process before pages reach the browser.

Alternative: augment https://playwright.dev/docs/mock with recommendations on mocking server-to-server communication without introducing additional Playwright API.

Example

No response

Motivation

Playwright's HAR recording (recordHar) and replay (routeFromHAR) only cover browser-level network traffic. This creates a gap for testing SSR applications where most API calls occur server-side during initial page rendering.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions