agentleFS
vindreshsinghvindreshsingh/engineering-skills/skills/e2e-testing/SKILL.md

e2e-testing

Skill0 starsChanged 5 months agoMITView on GitHub

Writes and runs end-to-end tests that prove critical user flows work in a real browser. Use when unit tests pass but user journeys need verification, before release of UI flows, or when regressions happen only in full-stack integration.

92 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use everything-claude-code, investor-materials and 10 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • InfopibeSkill

    everything-claude-code

    Also in 10 projects that use this

  • InfopibeSkill

    investor-materials

    Create and update pitch decks, one-pagers, investor memos, accelerator applications, financial models, and fundraising materials. Use when the user needs investor-facing documents, projections, use-of-funds tables, milestone plans, or materials that must stay internally consistent across multiple fundraising assets.

    Also in 28 projects that use this

  • mryeastcodeSkill

    everything-claude-code-conventions

    Development conventions and patterns for everything-claude-code. JavaScript project with conventional commits.

    Also in 8 projects that use this

  • tpavanipradeepSkill

    bun-runtime

    Bun as runtime, package manager, bundler, and test runner. When to choose Bun vs Node, migration notes, and Vercel support.

    Also in 18 projects that use this

  • niloykumarbarmanSkill

    agent-sort

    Build an evidence-backed ECC install plan for a specific repo by sorting skills, commands, rules, hooks, and extras into DAILY vs LIBRARY buckets using parallel repo-aware review passes. Use when ECC should be trimmed to what a project actually needs instead of loading the full bundle.

    Also in 8 projects that use this

  • niloykumarbarmanSkill

    product-capability

    Translate PRD intent, roadmap asks, or product discussions into an implementation-ready capability plan that exposes constraints, invariants, interfaces, and unresolved decisions before multi-service work starts. Use when the user needs an ECC-native PRD-to-SRS lane instead of vague planning prose.

    Also in 9 projects that use this

  • +1 more from Infopibe

The file

We split this skill into the rules it gives an agent

8 rules. 0 are common, 8 are distinctive, and 0 are very specific to this project.

  • 0

    Common

    Most of the 40 edited versions we read keep these.

  • 8

    Distinctive

    This author's own choices. Worth a look.

  • 0

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Use the e2e testing checklist alongside this process.

    line 16
  2. Distinctive:

    Before release of a new UI flow

    line 22
  3. Distinctive:

    After refactor touching routing, auth, or API integration

    line 23
  4. Distinctive:

    Start with 3–5 P0 flows max — flaky huge suites get ignored.

    line 40
  5. Distinctive:

    Run against staging or local with test DB — never prod

    line 66
  6. Distinctive:

    Run P0 smoke on PR (allow 5–10 min budget)

    line 86
  7. Distinctive:

    Update tests when intentional UI change — same PR as code

    line 95
  8. Distinctive:

    No test for the primary revenue or signup path

    line 110

“Common” is measured: kept by at least 6 in 10 of the 40 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

E2E Testing

Unit tests prove functions work; E2E tests prove users can complete journeys. A checkout flow, login, or "first connection" path that only works in isolation is not shippable — exercise it in a real browser against a running app.

Pairs with [[test-first]] for unit/integration layers, [[browser-checks]] for manual/exploratory verification, [[spec-first]] for scenarios to automate, [[pipeline-ops]] to run E2E in CI, and [[launch-readiness]] before promoting to production.

Use the e2e testing checklist alongside this process.

When to Use

  • Critical user journey must not break (auth, signup, payment, core feature path)
  • Bug only reproduces full-stack or in browser
  • Before release of a new UI flow
  • After refactor touching routing, auth, or API integration
  • Replacing manual regression with automated smoke suite

Skip for pure backend/API changes with no user journey impact — use [[test-first]] only.

Process

1. Pick flows — not every screen

Prioritize by risk and frequency:

TierExamplesE2E depth
P0 smokeLogin, signup, core happy pathEvery PR / nightly
P1Settings, secondary flowsNightly
P2Edge cases, adminWeekly or pre-release

Start with 3–5 P0 flows max — flaky huge suites get ignored.

2. Write scenarios from spec

Each test = one user goal from [[spec-first]] acceptance criteria:

Given [starting state]
When  [user actions]
Then  [observable outcome]

One behavior per test. Name tests after the user outcome, not the selector.

3. Choose stack and conventions

Pick one and stick to it:

  • Playwright — recommended for modern web (Chromium, Firefox, WebKit)
  • Cypress — good DX for React apps

Conventions:

  • data-testid for stable selectors — avoid CSS classes and nth-child
  • Page object or fixture pattern when flows share steps
  • Seed test data via API or factory — don't depend on prod data
  • Run against staging or local with test DB — never prod

4. Implement — arrange, act, assert

1. Arrange — seed user/data, navigate to start URL
2. Act     — user clicks, fills, submits (one journey)
3. Assert  — URL, visible text, API side effect, DB state
4. Cleanup — delete test user/data if needed

Rules:

  • No arbitrary sleeps — wait for network idle, selector, or API response
  • Isolate tests — each can run alone and in parallel
  • Deterministic data — unique emails (test+${runId}@example.com)
  • Capture artifacts on failure — screenshot, trace, video in CI

5. Wire into CI ([[pipeline-ops]])

  • Run P0 smoke on PR (allow 5–10 min budget)
  • Full suite nightly
  • Fail PR on P0 break; quarantine flaky tests within 24h — don't mute forever
  • Store traces as CI artifacts

6. Maintain — flaky is failure

  • Retry max 1–2 in CI only after fixing root cause
  • Track flaky rate; >2% means investigate selectors or timing
  • Update tests when intentional UI change — same PR as code

Common Rationalizations

  • "Unit tests cover it" — Integration gaps hide in wiring, routing, and cookies.
  • "E2E is too slow for CI" — Run smoke only on PR; full suite nightly.
  • "We'll add E2E later" — Later never comes; P0 flows first.
  • "Sleep 3 seconds works" — Flakes follow; use proper waits.

Red Flags

  • Tests depend on execution order
  • Hard-coded prod URLs or credentials
  • Selectors tied to CSS modules that change weekly
  • Suite disabled in CI "temporarily" for months
  • No test for the primary revenue or signup path

Verification

  • P0 flows identified (3–5 max) with spec traceability
  • Tests use stable selectors and deterministic data
  • Each test runs isolated; no sleep-based waits
  • P0 smoke runs in CI on PR
  • Failure artifacts (screenshot/trace) configured
  • Flaky tests quarantined or fixed — not ignored

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.