browser-testing
Skill4 starsChanged 4 months agoMITView on GitHub
Writes and debugs end-to-end browser tests — Playwright, Cypress, Selenium — covering selector strategy, waiting, test data, and the flakiness that makes suites get ignored. Use this whenever the user mentions E2E tests, browser tests, UI tests, Playwright, Cypress, Selenium, or a flaky or slow browser suite, and also when a bug is only reproducible through the UI. For testing logic below the UI, use unit-testing.
8 other projects use a version of this.
Adopted by
Most recently taken up by
- Univers42/claude-deal-with-the-deviltheir own version, first seen Oct 4, 2026
- Patrity/skillstheir own version, first seen Sep 3, 2026
- thiientv/godmodetheir own version, first seen Aug 13, 2026
- roundpilot/superpowers-antigravitytheir own version, first seen Jun 10, 2026
- kumaran-is/claude-code-onboardingtheir own version, first seen May 25, 2026
- ironbee-ai/ironbee-devtools-skillstheir own version, first seen May 16, 2026
Used with
Projects with it also use receiving-code-review.
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.
CloudflareSkillreceiving-code-review
Use when receiving code review feedback, before implementing suggestions, especially if feedback seems unclear or technically questionable - requires technical rigor and verification, not performative agreement or blind implementation
Also in 3 projects that use this
Other versions8 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 8
- thiientv/godmode★ 96same name
- roundpilot/superpowers-antigravity★ 70same name
- kumaran-is/claude-code-onboarding★ 36same name
- neuron-one/GODMODE★ 33same name
- Univers42/claude-deal-with-the-devil★ 4same name
- bhaumikmaan/claude-code-master-skills★ 3same name
- ironbee-ai/ironbee-devtools-skills★ 3same name
- Patrity/skills★ 2same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository61 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- agent-deploymentSkill
- agent-designSkill
- agent-evaluationSkill
- agent-hardeningSkill
- agent-implementationSkill
- agent-observabilitySkill
- agent-scopingSkill
- api-designSkill
- code-templatingSkill
- dependency-upgradeSkill
- error-handlingSkill
- feature-implementationSkill
- project-scaffoldingSkill
- refactoringSkill
- data-analysisSkill
- data-migrationSkill
- data-modelingSkill
- sql-queriesSkill
- ci-pipelinesSkill
- containerizationSkill
- deployment-strategiesSkill
- infrastructure-as-codeSkill
- debuggingSkill
- issue-investigationSkill
- issue-triageSkill
- log-analysisSkill
- network-troubleshootingSkill
- performance-profilingSkill
- api-documentationSkill
- commit-messagesSkill
- diagrammingSkill
- markdown-docsSkill
- plain-languageSkill
- pr-descriptionsSkill
- release-notesSkill
- integration-testingSkill
- load-testingSkill
- test-dataSkill
- test-driven-developmentSkill
- unit-testingSkill
- deep-researchSkill
- feed-digestSkill
- summarizationSkill
- accessibility-reviewSkill
- code-analysisSkill
- code-lintingSkill
- code-reviewSkill
- auth-designSkill
- dependency-auditSkill
- secrets-managementSkill
- security-analysisSkill
- threat-modelingSkill
- capacity-planningSkill
- disaster-recoverySkill
- incident-responseSkill
- monitoring-setupSkill
- root-cause-analysisSkill
- runbooksSkill
- The first 60 shown.
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 8 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
- Distinctive: line 17
Rule of thumb: if a case can be covered below the UI, cover it there.
- Distinctive: line 45
Done when: no selector in the suite depends on the DOM's structure.
- Distinctive: line 53
Wait for the state you actually need: an element to be visible, a request to resolve, text to change, a URL to update.
- Distinctive: line 67
Create what the test needs, in the test — via API or direct DB setup, not by clicking through the UI.
- Distinctive: line 69
Use unique values — timestamped or random emails, names, IDs, so parallel runs cannot collide.
- Distinctive: line 89
When a test fails intermittently, find the cause before touching retries.
- Distinctive: line 107
Run it in parallel, and shard in CI.
- Distinctive: line 111
When a journey stops being critical, delete its test.
“Common” is measured: kept by at least 6 in 10 of the 8 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.
Files
Browser testing
Browser tests are the most expensive tests you own — slowest to run, most likely to break for reasons unrelated to your code, hardest to debug. That cost buys one thing nothing else does: proof that the pieces work together in a real browser.
Spend that budget on a small number of journeys that must never break. A large E2E suite is not thorough; it is slow, flaky, and eventually ignored, and an ignored suite provides no safety while still consuming CI time.
Rule of thumb: if a case can be covered below the UI, cover it there. E2E is for the wiring.
1. Choose the journeys
Pick the paths where failure is unacceptable, typically five to fifteen for a whole product:
- Sign up, sign in, sign out
- The core action the product exists for
- Anything involving money
- The path most users take on first visit
For each, test the happy path plus the one failure that matters (declined card, taken username). Every remaining permutation belongs in a cheaper test.
Done when: the journey list is written and short enough to defend.
2. Select elements the way a user identifies them
Selector choice determines whether the suite survives a redesign. In order of preference:
- Role and accessible name —
getByRole("button", { name: "Save" }). Closest to how a person finds the control, and it fails when accessibility breaks, which is a real bug. - Visible text —
getByText, for non-interactive content. - Dedicated test attributes —
data-testid. Explicit contract, immune to restyling. Use when the first two are ambiguous. - CSS or XPath structure, a last resort.
div > div:nth-child(3) > spanencodes the DOM shape, and it breaks on a layout change that broke nothing for users.
Done when: no selector in the suite depends on the DOM's structure.
3. Never wait for time
Fixed sleeps are the single largest source of flakiness. sleep(2000) is simultaneously too
long on a fast machine and too short on a loaded CI runner — it wastes time and fails
randomly, the worst of both.
Wait for the state you actually need: an element to be visible, a request to resolve, text to change, a URL to update. Modern frameworks auto-wait on assertions — lean on that rather than adding explicit waits.
The exception worth knowing: waiting for something to not appear genuinely requires a timeout, since absence has no event. Keep it short and rare.
Done when: the suite contains no unconditional sleeps.
4. Make each test own its data
Tests that share fixtures fail in ways that depend on execution order, and order-dependent failures cost hours to diagnose.
- Create what the test needs, in the test — via API or direct DB setup, not by clicking through the UI. Setting up state through the UI makes every test depend on every other feature.
- Use unique values — timestamped or random emails, names, IDs, so parallel runs cannot collide.
- Clean up after, but never rely on cleanup for correctness. Assume the previous run crashed halfway.
Done when: any single test passes alone, and the full suite passes in parallel.
5. Make failures diagnosable
A browser test that fails in CI with "element not found" and nothing else will be marked flaky and skipped. Configure, before you need them:
- Screenshot on failure, always
- Video or trace for the failing test — a Playwright trace is worth more than any log line
- Console and network logs captured as artifacts
- A meaningful test name that identifies the journey and the step
Done when: you could diagnose a CI-only failure without reproducing it locally.
6. Handle flakiness as a defect
When a test fails intermittently, find the cause before touching retries. Almost always one of:
- A race: asserting before the app finished updating. Fix the wait, not the timing.
- Animation: an element present but still moving. Disable animations in the test environment; this removes a whole class of flake at once.
- Shared state: see step 4.
- Genuine non-determinism: real time, random ordering, timezone. Control it: freeze the clock, seed the randomness, pin the timezone.
- A real bug: the one that intermittently fails is sometimes telling the truth about a race in the application. Rule this in or out before dismissing it.
Retries hide all five. Use them only as a temporary measure with the flake tracked as an issue — an automatic retry on a real race means shipping the race.
Done when: the test passes 20 consecutive runs, or the flake is filed with a cause.
Keeping the suite affordable
Run it in parallel, and shard in CI. Keep a smoke subset, two or three journeys — that runs on every commit, with the full suite on merge or nightly. Fast feedback on the critical path beats complete feedback nobody waits for.
When a journey stops being critical, delete its test. A suite that only ever grows becomes the thing people route around.
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
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.

