Skip to main content

Feature

Generate Playwright Tests From Real Sessions

Click through your app, get production-grade Playwright tests with real selectors, real assertions, and real stability. Replace half your hand-written E2E suite this afternoon.

Why teams pick this

Stable selectors

We pick the most stable locator at every step — data-testid > role > text > nth-of-type — so tests don't break when a designer adds a div.

Generated assertions

The model infers the assertion from the session — page title changed, modal appeared, success toast was shown, network call returned 200.

Playwright + Cypress

Pick your framework. We emit Playwright by default (TypeScript + page-object), with a Cypress option for teams with existing infrastructure.

Continuous regeneration

When the UI changes, regenerate tests from a fresh session. CI integration gates regenerated tests behind review; nothing auto-merges.

How it works

  1. 1

    Record a real session

    Either a teammate clicks through the flow, or you grab an existing session that hit the path you care about.

  2. 2

    Mark the milestones

    Drag handles in the timeline to scope the test ("from login to upgrade-confirmed"). The rest is filtered out as noise.

  3. 3

    Pick framework + style

    Playwright (default) or Cypress. Page-object pattern or flat. TypeScript or JavaScript. Choices are remembered per-workspace.

  4. 4

    Get test code

    Copy to clipboard, download as a file, or open a PR via the GitHub integration. Selectors and assertions are commented inline.

Under the hood

Why our selectors don't break

Most session-to-test tools emit `body > div:nth-child(3) > div.css-1abc23 > button` and call it done. We try locators in priority order — `getByTestId` → `getByRole` → `getByText` → `locator(css)` — and pick the first one that uniquely identifies the element across the entire session. The result: tests that survive a refactor instead of fighting one.

How assertions are inferred

After every user action, the model looks at what changed: did the URL update, did a new element appear, did a network call complete, did a console message fire? It picks the most observable signal and writes the assertion. You can edit the generated assertion text with a single click; the underlying logic stays.

Maintaining the suite over time

Don't maintain by editing — regenerate. When a UI changes, capture a fresh session of the new flow and regenerate the test. The diff is the maintenance work, and it shows up in your PR review where it belongs.

Frequently asked

Does this replace my whole E2E suite?

For happy-path coverage, yes — most teams replace 60–80% of their hand-written suite. Edge-case tests (timing, race conditions, stress) still want hand-crafted tests; we don't pretend otherwise.

Which frameworks are supported?

Playwright (TypeScript and JavaScript) is the primary target. Cypress is supported as a secondary output. Selenium / Puppeteer are on the backlog and have a community-vote tracker.

How do I add custom logic (auth setup, fixtures)?

The generated test imports from a `fixtures/` file you control. We never overwrite that file — generated tests just reference it. Auth setup, custom matchers, and test-data builders all live in your code, exactly where they should.

How does this work in CI?

Generated tests are normal Playwright tests — they run in any CI you already use. We don't require a Relyv-hosted runner. There's a separate "regenerate from session" CI step you can wire up if you want, but it's opt-in.

Does test generation work for mobile + PWA flows?

Yes. The Wave-7 mobile capture stack (PointerEvent with pressure + tilt, pinch-zoom state machine, virtual-keyboard via visualViewport, Service Worker + battery + offline transitions) feeds the test generator, so generated tests replay mobile gestures fully — including tap-and-hold, pinch-to-zoom, and keyboard-driven layout shifts. Playwright's mobile emulation runs them.

Can my AI agent generate and run tests via MCP?

Yes — Relyv is MCP-native. Claude, Cursor, and Continue call get_session_intelligence on a session, then trigger Playwright-test generation as a tool call. The agent can iterate on a failing test, regenerate from a new replay, and PR the change without leaving the IDE.

Ready to try it?

Click through your app, get production-grade Playwright tests with real selectors, real assertions, and real stability. Replace half your hand-written E2E suite this afternoon.