---
title: "test-proxy-recorder — VCR for Playwright"
description: "Case study: building test-proxy-recorder, which records real API traffic across Next.js SSR, browser and WebSocket once, then replays it on CI with no backend."
canonical: "https://asmyshlyaev177.dev/projects/test-proxy-recorder"
image: "https://asmyshlyaev177.dev/og_image.png"
---

[All projects](https://asmyshlyaev177.dev/projects.md)

Deterministic e2e on CI with the backend turned off

# test-proxy-recorder

VCR for Playwright — records real API responses once, then replays them deterministically on CI. Covers Next.js SSR, browser, and WebSocket traffic with no backend and no hand-written mocks. I built it because every flaky e2e run traces back to the network.

GitHub stars

75

npm installs / week

151

## The challenge

Every flaky e2e run has the same root cause: the network. Existing tools each leave a gap — record real traffic, or cover SSR, or handle WebSockets, but never all three without hand-writing the mocks.

## My role

Sole author and maintainer. Designed the record/replay proxy, the SSR + browser + WebSocket capture, the CLI, the docs site, and every release.

## Result

Records real traffic across SSR, browser, and WebSockets, then replays it byte-for-byte on CI — so tests pass with the backend off.

## Built with

-   TypeScript
-   Playwright
-   Next.js
-   WebSocket
-   e2e
-   npm

[Live demo](https://test-proxy-recorder.dev/) · [Source](https://github.com/asmyshlyaev177/test-proxy-recorder)

More on this

[Testing Next.js SSR with Playwright: record real responses instead of writing mocks](https://asmyshlyaev177.dev/blog/testing-nextjs-ssr-playwright-record-replay.md)

Playwright can mock browser requests, but not the fetches Next.js makes during SSR. How I record real API responses once and replay them on CI. It's the VCR pattern Ruby nailed years ago, rebuilt for SSR.

I'm available for full-time remote work in EU timezones. Happy to talk through anything here in more detail.

[Get in touch](https://asmyshlyaev177.dev/#contact)

---

Site summary for LLMs: <https://asmyshlyaev177.dev/llms.txt> · Blog: <https://asmyshlyaev177.dev/blog>
