Installs into .claude/skills of the current project.
Sponsors
SSkills DirectorySkills Directory
Know which skills are safe — weekly.
SSkills DirectorySkills Directory
Is that skill safe to install?
Are you the author of E2e Testing?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/ansh44233-e2e-testing)
---
description: Reliable end-to-end tests for critical user journeys
profile: full
tags: testing, e2e
---
# E2E Testing
## Scope
- Cover a few critical journeys deeply (sign-up, checkout, the core workflow) rather than many shallowly. Unit and integration tests cover the rest.
- One journey per test file; each test states the user goal in its name.
## Writing tests
- Use role and label selectors (`getByRole('button', { name: 'Save' })`), or `data-testid` as a fallback. Never use brittle CSS paths or text that changes with copy edits.
- Create isolated test data per test through the API or a seed helper. Tests must pass in any order and in parallel.
- Wait on application state (a response, a visible element, a URL), never fixed sleeps.
- Stub third-party services (payments, email) at the network boundary, and never call production.
## Running
- Capture traces, screenshots and video on failure only. Upload them as CI artifacts.
- Track the flake rate. Quarantine a flaky test with an issue link instead of retrying it silently.
## Verify
Run the suite headless twice in a row (`npx playwright test --repeat-each=2` or the equivalent). Both runs pass, and the run that fails on purpose (break one assertion) shows a useful trace.