Back to Blog

Changelog: Multi-Context Testing, Email Link Actions & Playwright Exports

Announcing three major updates to Mechasm.ai: Multi-context test execution, email link actions for inbox-driven flows, and Playwright exports from the Test Editor.

We’ve shipped a new set of platform updates focused on helping teams automate more realistic user journeys and get more value out of generated tests.

This release focuses on three common gaps in end-to-end automation:

  • multi-user workflows that span isolated browser sessions
  • inbox-driven flows that depend on email links
  • exporting generated tests into reusable Playwright code

1. Multi-Context Test Execution

A lot of critical product flows do not happen inside a single browser session. Real applications often require multiple users, different roles, or separate isolated states interacting inside the same workflow.

The Problem: Real workflows span multiple sessions

Testing collaboration, approvals, invite flows, chat, and role-based access often means switching between different users without leaking cookies, storage, or authentication state across sessions.

Without first-class support for this, teams end up breaking one real flow into multiple disconnected tests, which makes debugging harder and reduces confidence in the full scenario.

The Solution: Multiple isolated browser contexts in one test run

Mechasm now supports running tests across multiple browser contexts within the same execution.

Each context behaves like an isolated incognito-style session with its own:

  • cookies
  • local storage
  • session storage
  • IndexedDB
  • cache

Tests can switch between contexts using a context ID such as default, secondUser, or manager, then resume exactly where that session left off.

This makes it possible to model real multi-user workflows inside a single coherent test run.

Short example

A refund approval flow can now run as one test:

  • Context user: Submit a refund request
  • Context manager: Open the admin dashboard and approve it
  • Context user: Switch back and verify the refund status changed to Approved

For teams testing collaboration products, the same pattern also works for chat, document editing, admin review flows, and shared dashboards.

See the docs: Multi-Context Tests


Many important product flows do not stop at the browser. Password resets, magic links, onboarding invites, and verification flows often depend on receiving an email and following the right link.

The Problem: Inbox-driven flows are hard to automate reliably

Traditional test automation usually handles email poorly. Teams often end up mocking the flow, using brittle inbox scraping, or manually extracting links outside the test.

That means one of the most important parts of the user journey often goes untested.

Mechasm now supports openEmailLink, allowing the runner to find the right email, resolve the right link, and open it during the test.

The runner can narrow the match using:

  • email filters such as from, subject, and bodyIncludes
  • link filters such as partial link text, partial URL matches, or URL regex patterns

The link can then be opened in:

  • the current active page
  • a new tab in the same session
  • a separate isolated context

This makes email-based user journeys much easier to express and much more reliable to run.

Short example

A password reset flow can now be described and executed like this:

  • Request a password reset
  • Find the email from [email protected]
  • Open the reset link in a new tab in the same session
  • Continue the reset flow without losing the original app state

The same feature also works well for magic login links, invite acceptance, and email verification journeys.

See the docs: Emails in Tests


3. Playwright Exports

Generated tests are useful inside Mechasm, but teams often want to take that work further inside their own repositories and workflows.

The Problem: Generated coverage is hard to reuse outside the platform

Without an export path, teams have to manually rewrite working flows into Playwright, which slows adoption and creates unnecessary duplication.

The Solution: Export generated tests as Playwright files

Mechasm now lets users export generated tests as Playwright .spec.ts files directly from the Test Editor.

The export flow is asynchronous and built for iterative use:

  • request an export from the test detail page
  • wait for the generated Playwright file to be prepared
  • download the latest export when it is ready
  • replace the previous export automatically when a new one is requested

This keeps the latest export clean and easy to retrieve without accumulating stale files for the same test.

Short example

A team can now:

  • generate a test from a prompt
  • review the generated steps in the editor
  • click Export
  • download the latest .spec.ts once it is ready
  • continue refining or integrating that file in their Playwright suite

See the docs: The Test Editor


What's Next?

These updates continue our push to make Mechasm useful across the full testing lifecycle: generating realistic tests, executing flows that mirror real user behavior, and giving teams clean ways to debug and reuse that work.

These features are live now. Log in to Mechasm.ai to try them out.

Want to learn more?

Explore our other articles about Agentic AI testing or get started with Mechasm today.