Engineering E2E Testing Test Generation

E2E Test Prompt — User Journeys, Not Functions

Cart to confirmation as a user would do it — with the failure scenarios real users actually trigger: refreshes, back buttons, double clicks.

Overview

End-to-end tests written like unit tests waste a browser: they poke at elements instead of walking journeys. This setup generates the E2E contract for a checkout flow at production-ready depth: realistic workflows from entry to outcome, minimal mocking (only true externals like payments), assertions at both ends — what the user sees and what the system stores — and the failure scenarios that separate E2E from demos: mid-flow refresh, slow networks, expired sessions, double-submission, and the back button revisiting a completed step.

Workflow

  1. Define the journey, not the pages

    Entry to outcome — the contract tests what the user is trying to accomplish.

  2. Keep the failure scenarios

    Refresh, back button, session expiry, double submit — the four ways real users break flows daily.

  3. Assert both ends

    The confirmation the user sees AND the order the system stored — a journey that only checks one end checks nothing.

Why This Works

  • Journey framing produces tests that mean something when they fail
  • User-behavior failure scenarios cover what staging never sees and production always does
  • Production-ready depth bans the sleeps and ordering that make E2E suites flaky

Best for

  • Flows where the journey IS the product — checkout, onboarding
  • Teams whose E2E suite only tests the sunny day
  • Production-bound flows that meet real browsers and real impatience

Not for

  • Logic that a unit test reaches in milliseconds — E2E is the expensive tier, spend it on journeys
  • Diagnosing why a flow currently fails — that's the Debugging Prompt Generator

Use cases

  • Testing checkout, signup, and onboarding flows end to end
  • Covering the double-submit that creates duplicate orders
  • Verifying the journey survives a mid-flow refresh

Tip: Save time by exploring related resources and tools that integrate with this workflow.

Explore all resources