agentleFS
mejbaurbaharmejbaurbahar/software-tester-skills/skills/e2e-testing/SKILL.md

e2e-testing

Skill1 starsChanged 52 days agoMITView on GitHub

Use when automating end-to-end user journeys through the browser or UI — Playwright, Cypress, user critical paths, resilient locators, session storage, network stubbing, and visual artifacts.

  • Reads credentials

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

2 rules. 0 are common, 1 is distinctive, and 1 is very specific to this project.

  • 0

    Common

    Most of the 40 edited versions we read keep these.

  • 1

    Distinctive

    This author's own choices. Worth a look.

  • 1

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Money/conversion: search → cart → checkout → payment sandbox → confirmation (payment-ecommerce-testing).

    line 16
  2. Distinctive:

    Core data mutation: create → edit → save → reload and verify persistence → delete.

    line 18

“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

End-to-End (E2E) Testing

E2E tests validate complete user journeys through the real UI, backend and data store. They are the most realistic and the most expensive tests: keep few, make them critical, make them reliable.

Which journeys deserve an E2E test

  • Money/conversion: search → cart → checkout → payment sandbox → confirmation (payment-ecommerce-testing).
  • Identity: sign-up, sign-in, OAuth redirect, password reset, logout, session expiry.
  • Core data mutation: create → edit → save → reload and verify persistence → delete.
  • Error recovery: validation errors, network failure banner, retry, empty states.
  • Permissions: the same journey per role (admin vs member vs read-only). Everything else belongs at API/component level (test-architect). Target a suite you can run in < 15 min with sharding.

Golden rules

  1. User-facing locators first: getByRole, getByLabel, getByText; then getByTestId; avoid brittle CSS/XPath (div > span:nth-child(3)) and styling classes.
  2. Auto-wait, never sleep. Assert on conditions: await expect(page.getByRole('alert')).toBeVisible().
  3. Independent tests. Each test sets up its own data via API and starts from a clean context; log in via stored auth state, not the UI, every time.
  4. Control the world: stub or sandbox third parties, freeze time when relevant, seed deterministic data (test-environment-management).
  5. Evidence on failure: trace, video, screenshot, console and network logs, retained as CI artifacts.
  6. One journey per test, with meaningful assertions at each milestone (not 40 clicks then one assert).

Playwright starter

// playwright.config.ts (essentials)
export default defineConfig({
  testDir: 'e2e', fullyParallel: true, retries: process.env.CI ? 1 : 0, workers: process.env.CI ? 4 : undefined,
  use: { baseURL: process.env.BASE_URL, trace: 'on-first-retry', video: 'retain-on-failure', screenshot: 'only-on-failure' },
  projects: [{ name: 'chromium', use: devices['Desktop Chrome'] }, { name: 'webkit', use: devices['Desktop Safari'] },
             { name: 'mobile', use: devices['Pixel 7'] }],
});
// global auth once:  npx playwright codegen --save-storage=.auth/user.json  (or a setup project using the API)
test('checkout with saved card', async ({ page }) => {
  await page.goto('/products/headphones');
  await page.getByRole('button', { name: 'Add to cart' }).click();
  await page.getByRole('link', { name: /cart/i }).click();
  await page.getByRole('button', { name: 'Checkout' }).click();
  await page.getByLabel('Card number').fill('4242 4242 4242 4242');      // sandbox card
  await page.getByRole('button', { name: 'Pay' }).click();
  await expect(page.getByRole('heading', { name: /thank you/i })).toBeVisible();
  expect(await api.getOrder(await orderIdFrom(page))).toMatchObject({ status: 'PAID' });  // verify backend, not just UI
});
npx playwright test --ui                        # debug locally
npx playwright show-trace trace.zip             # post-mortem
npx playwright test --shard=1/4                 # CI sharding
npx playwright test --repeat-each=20 e2e/checkout.spec.ts   # stability check

Other tools: Cypress (great DX, single-tab model), Selenium/WebDriver (broad legacy support), Puppeteer (Chrome automation), TestCafe.

Handling hard cases

SituationApproach
Third-party widgets (payment iframes, captcha)Sandbox/test keys, provider test modes; bypass captcha with a test flag in non-prod
Email/SMS stepsCapture inbox API (email-notification-testing)
File upload/downloadsetInputFiles, waitForEvent('download')
Multiple tabs/usersSeparate browser contexts per user
Real-time updatesTwo contexts + event assertions (websocket-realtime-testing)
Animations/loadingDisable CSS animations in test mode; wait for stable state
Slow environmentsFix the environment; never inflate timeouts globally

Add cheap extra signal in the same run

Accessibility scan per page (@axe-core/playwright), console-error and failed-request assertions, performance budget on key pages, visual snapshot of one or two stable views.

Anti-patterns

Login through the UI in every test · shared mutable test accounts · asserting only "no error thrown" · chained tests that rely on earlier state · huge "mega journeys" · retries hiding real flakiness · testing what unit tests already prove.

Related

test-automation, flaky-test-management, cross-browser-testing, accessibility-testing, visual-testing, bdd-gherkin-testing

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.