webapp-testing
Skill0 starsChanged 2 months agoMITView on GitHub
Executable, local-only E2E + TDD workflow for web apps — real Playwright config, a Python test runner, and a custom self-contained html report (grouped by test-case-matrix category, click a test to expand its steps, every screenshot, and a slowed-down video with adjustable playback speed) — not just markdown code snippets or Playwright's bare default report. Runs up to 3 browser windows in parallel when headed, not an uncapped wall of Chrome windows. No CI provider or GitHub Actions wiring — everything here runs on your own machine, on demand or via an optional local git pre-push hook. Tags and tears down any application data a spec creates (not just report artifacts) so runs don't pollute the app's real database — see `api-testing` for the shared strategy. Use when setting up or running E2E tests for a webapp end-to-end, not just reading patterns about it.
- Installs packages
- Commits and pushes
187 other projects use a version of this.
Adopted by
Most recently taken up by
- magicpro97/vibeflowtheir own version, first seen Oct 4, 2026
- IGTA-Tech/claude-skills-researchtheir own version, first seen Oct 3, 2026
- apiricrypto/satno-agent-skillstheir own version, first seen Oct 1, 2026
- productionx-in/Core-Skillstheir own version, first seen Sep 29, 2026
- BrightGold70/skillstheir own version, first seen Sep 29, 2026
- leishifu666/skillstheir own version, first seen Sep 29, 2026
Used with
Projects with it also use skill-share, raffle-winner-picker 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.
ArogyaReddySkillskill-share
A skill that creates new Claude skills and automatically shares them on Slack using Rube for seamless team collaboration and skill discovery.
Also in 20 projects that use this
ArogyaReddySkillraffle-winner-picker
Picks random winners from lists, spreadsheets, or Google Sheets for giveaways, raffles, and contests. Ensures fair, unbiased selection with transparency.
Also in 20 projects that use this
trendinuxSkilltwitter-algorithm-optimizer
Analyze and optimize tweets for maximum reach using Twitter's open-source algorithm insights. Rewrite and edit user tweets to improve engagement and visibility based on how the recommendation system ranks content.
Also in 12 projects that use this
bkootazSkillartifacts-builder
Suite of tools for creating elaborate, multi-component claude.ai HTML artifacts using modern frontend web technologies (React, Tailwind CSS, shadcn/ui). Use for complex artifacts requiring state management, routing, or shadcn/ui components - not for simple single-file HTML/JSX artifacts.
Also in 34 projects that use this
guaderramaSkilllead-research-assistant
Identifies and qualifies potential leads by analyzing products/services, understanding ideal customer profiles, conducting intelligent web research using Bright Data MCP tools, and providing actionable outreach strategies. Use when researching leads, prospecting, qualifying contacts, analyzing companies, enriching lead data, or creating outreach campaigns.
Also in 26 projects that use this
mm-mazharSkillcache-components
Expert guidance for Next.js Cache Components and Partial Prerendering (PPR).
Also in 5 projects that use this
- +5 more from ArogyaReddy
Other versions187 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 187
- anthropics/skills★ 199ksame name
- ComposioHQ/awesome-claude-skills★ 77ksame name
- github/awesome-copilot★ 40ksame name
- composio-community/awesome-codex-skills★ 17ksame name
- Galaxy-Dawn/claude-scholar★ 5.7ksame name
- microsoft/FluidFramework★ 4.9ksame name
- Prat011/awesome-llm-skills★ 1.8ksame name
- warpdotdev/oz-skills★ 825same name
- LeastBit/Claude_skills_zh-CN★ 586same name
- spytensor/openmozi★ 423same name
177 more not listed
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 repository29 other files it gives its agents.
- agent-doctorSkill
- ai-discoverabilitySkill
- api-designSkill
- api-testingSkill
- backend-patternsSkill
- branchingSkill
- brd-readerSkill
- codebase-explainSkill
- code-review-and-qualitySkill
- database-migrationsSkill
- debuggingSkill
- dependency-updateSkill
- deploymentSkill
- docker-patternsSkill
- e2e-testingSkill
- exec-todoSkill
- incremental-implementationSkill
- modern-web-guidanceSkill
- mysql-patternsSkill
- prd-grillSkill
- project-bootstrapSkill
- react-patternsSkill
- react-testingSkill
- security-and-hardeningSkill
- security-reviewSkill
- skill-syncSkill
- nama-skill-contohSkill
- test-case-matrixSkill
- test-driven-developmentSkill
The file
We split this skill into the rules it gives an agent
6 rules. 0 are common, 1 is distinctive, and 5 are very specific to this project.
0
Common
Most of the 182 edited versions we read keep these.
1
Distinctive
This author's own choices. Worth a look.
5
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 53
Ensure @playwright/test is a dev dependency (npm i -D @playwright/test).
- Very specific: line 56
Always do this in the same pass, don't skip it: check the project's .gitignore for docs/qa/playwright-report/, docs/qa/test-results/, …
- Very specific: line 66
Write the test first (RED): Before implementing a new flow, write an E2E spec under tests/e2e/ that describes the desired behavior.
- Very specific: line 111
Match the matrix's language: If the source matrix writes Test Case and Test Steps in Bahasa Indonesia (see test-case-matrix), the …
- Very specific: line 271
Add a Playwright globalTeardown (see playwright.config.ts's globalTeardown option) that deletes everything tagged with this run's id, …
- Distinctive: line 280
Don't report an E2E suite "set up" or "passing" while it creates real records and neither of these exists — that's exactly the kind of …
“Common” is measured: kept by at least 6 in 10 of the 182 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
Webapp Testing (E2E + TDD, executable)
Sets up a webapp with a ready-to-run E2E test pipeline — real files you copy and execute, not markdown snippets to retype every session. Combines the TDD red-green-refactor discipline with Playwright E2E, wired through a single Python entrypoint.
Related skills: for granular Playwright patterns (Page Object Model,
flaky-test triage, artifact management), see e2e-testing. For general
red-green-refactor discipline beyond E2E (unit/integration tests), see
test-driven-development. For the scenario list to implement against
(functional/edge/error/state-transition cases) before writing any spec
file, see test-case-matrix — run that first, then use each of its
checklist items as the RED step for one spec here. For the database/data
hygiene concerns below (mock vs real DB, cross-service data dependencies,
teardown), see api-testing's references — this skill points to them
rather than duplicating. This skill sits on top of all of these — it's the
scaffolding that turns their patterns into files you actually run.
When to use
- Setting up E2E testing for a webapp project from scratch
- Adding a new user-facing flow and want a failing E2E test before implementing it (TDD applied to E2E)
- Gating a local
git pushon the suite passing, without any CI provider
When NOT to use
- You just need Playwright patterns/snippets to write a test by hand —
use
e2e-testinginstead - Pure unit/integration test TDD with no browser involved — use
test-driven-development
Steps
Install the scaffolding.
- Copy
assets/playwright.config.tsto the project root (merge manually if a config already exists). - Copy
scripts/run_e2e.pyandscripts/build_report.pyto the project'sscripts/folder — both assume they live next to each other there, andbuild_report.pyassumesscripts/sits directly under the project root (that's whatdocs/qa/...resolves against). - Ensure
@playwright/testis a dev dependency (npm i -D @playwright/test).
Always do this in the same pass, don't skip it: check the project's
.gitignorefordocs/qa/playwright-report/,docs/qa/test-results/,docs/qa/playwright-results.json, anddocs/qa/*/test-matrix.html(see "All output lives underdocs/qa/" below) — append whatever's missing. This is mandatory setup, not optional cleanup: without it, the very first run stages screenshots, videos, and a 1MB+ report file into git.docs/qa/<slug>/test-matrix.md(fromtest-case-matrix) is the only thing underdocs/qa/that should stay trackable — everything else there is regenerated output.- Copy
Write the test first (RED). Before implementing a new flow, write an E2E spec under
tests/e2e/that describes the desired behavior. It should fail — seereferences/tdd-e2e-workflow.mdfor the full red-green-refactor cycle applied to E2E specifically. For Page Object Model structure, folder layout, and flaky-test handling, follow the patterns ine2e-testing— this skill owns execution and the report format, not the test-writing patterns themselves.Before writing a flow that creates or depends on data, check who owns it. If the flow creates data whose creation logic lives in this repo (a normal signup form, say), proceed as usual. If it depends on an entity actually created/owned by another repo/service (e.g. this app's checkout flow assumes an order that an order-service elsewhere creates), stop and ask for that service's repo path, API contract, or a reachable staging endpoint instead of guessing its shape or writing straight to its tables — see
api-testing'sreferences/cross-service-test-data.mdfor the full reasoning. Either way, tag whatever data the test creates (arun_id, or a fixed prefix/email domain) so it can be found and removed later — see "Test data hygiene" below.Use
assets/step-shot-helper.ts'sstepShotpattern, not a flat test body. Add itsstepShotfunction to the project's test fixture file, then wrap each logical action in it instead of writing bareawait-chains:test('TC-F-01 — login success', async ({ page, loginPage }, testInfo) => { await stepShot(page, testInfo, 'Open /login', async () => { await loginPage.goto() }) await stepShot(page, testInfo, 'Fill credentials and submit', async () => { await loginPage.login(DEMO_EMAIL, DEMO_PASSWORD) await expect(page.getByTestId('dashboard-page')).toBeVisible() }) })Map each
stepShottitle to oneTest Stepsrow from this test case's entry intest-case-matrix's matrix — the report should show the same breakdown that's already written down there, not a different one invented per-spec. Without this, a test still runs and reports fine, it just has an empty step list and only the one auto "on" screenshot in the report (see step 3).Match the matrix's language. If the source matrix writes
Test CaseandTest Stepsin Bahasa Indonesia (seetest-case-matrix), the Playwrighttest()title and everystepShotlabel stay in Bahasa Indonesia too — same wording the matrix uses, not translated back to English. The report is meant to be read side-by-side with the matrix by a manual tester; a language mismatch between them defeats that. Keep theTC-F-01-style id prefix anddata-testid/selector literals as-is (untranslated) inside an otherwise Indonesian title/label — e.g.test('TC-F-01 — Login berhasil dengan kredensial demo', ...)withstepShot(page, testInfo, 'Buka /login', ...).Run the suite via the runner, not raw
npx playwright test.python scripts/run_e2e.pyThis wraps Playwright using the reporters set in
playwright.config.ts(listfor live terminal progress,html/jsonfor the report and machine-readable results — see that file, don't pass--reporteron the CLI, it replaces the config's reporters instead of adding to them), prints a pass/fail/flaky summary, then automatically callsbuild_report.pyto add video speed controls to the report Playwright just wrote atdocs/qa/playwright-report/— one command instead of re-deriving Playwright flags each time and remembering to run the post-processing step separately, usable the same way whether you type it yourself or the pre-push hook (step 5) calls it for you. It also prints the report command and where to find a failing test's trace at the end of every run, so you don't have to remember them — see "Playwright's own report, plus slow-motion video" below. Pass through Playwright options as needed:--grep <pattern>,--project chromium. Runs headed (a visible browser window) by default, so you can watch it work — pass--headlessfor unattended/agent-driven runs (an agent isn't watching the window, and some sandboxes have no display to open one on at all); the pre-push hook also runs headless for the same reason.Runs up to 3 workers in parallel even when headed (
workers: 3in config, capped below Playwright's uncapped default of roughly half the CPU cores) — enough Chrome windows at once to keep a headed run fast without it being an unwatchable wall of browser windows. CI stays pinned to 1 worker regardless.- Implement until green. Re-run
run_e2e.pyafter each change until the new spec passes, then refactor with tests still green. Optional: gate
git pushon the suite locally — no CI provider, no.github/workflows/, nothing that goes near GitHub. This skill deliberately does not ship a GitHub Actions (or any other hosted CI) pipeline file — running E2E is meant to stay entirely on the developer's own machine. If the user wants pushes gated on tests passing, installassets/pre-push-hook.shas a local git hook:cp <path-to-this-skill>/assets/pre-push-hook.sh .git/hooks/pre-push chmod +x .git/hooks/pre-pushThis only ever runs locally, as part of the developer's own
git push— no workflow file gets created, nothing is staged, nothing is committed. This step is opt-in like the rest of the automation here: don't install the hook unless asked, since it changes the behavior of every futuregit pushon this machine.rm .git/hooks/pre-pushto remove it.
Playwright's own report, plus slow-motion video
docs/qa/playwright-report/ is Playwright's own, unmodified html
reporter output — not a from-scratch clone. That's deliberate: their report
already has a status filter bar (All/Passed/Failed/Flaky/Skipped, each with
a live count), a search box, per-test step lists, file:line locations,
browser project badges, and retries shown as tabs — reimplementing all of
that in a custom generator means permanently trailing the real thing.
build_report.py (step 3) runs after Playwright writes that report and
adds two things on top, without touching Playwright's own markup, styles,
or data:
- Slow-motion playback controls on every video. It appends a small
vanilla-JS snippet before
</body>that finds<video>elements — a plain HTML5 tag, not part of Playwright's internal React bundle, so this stays stable across Playwright version upgrades — sets their default rate to 0.5× (a real run is fast enough to be hard to follow at 1×), and adds speed buttons (0.25×/0.5×/1×/1.5×) next to each one. - A floating "Test Matrix" button (bottom-right corner) that opens a
menu of every
docs/qa/<slug>/test-matrix.mdthis project has, rendered as a standalone HTML page atdocs/qa/<slug>/test-matrix.htmlnext to the source markdown. This is a small custom renderer for the specific subset of markdowntest-case-matrix's template uses (headers, bold, inline code, links, GFM tables with literal<br>inside cells) — not a general CommonMark implementation, since the input is always that one skill's own generated shape. It re-renders and re-injects the menu on everybuild_report.pyrun (not gated by a marker check like the video controls) because which slugs exist can change between runs; the video-controls snippet stays gated since it never needs updating once present. Lets a tester jump from "did this run pass" straight to "which scenario, with what expected result and pre-condition, does this test case correspond to" without leaving the browser. Skipped silently if nodocs/qa/*/test-matrix.mdexists.
Open the report with npx playwright show-report docs/qa/playwright-report
— attachments (screenshots, video, traces) live in a sibling data/
folder, so this needs to be served, not opened by double-clicking
index.html directly. For a failure that needs deeper debugging (network
log, DOM snapshots at each action), open that test's trace.zip from
docs/qa/test-results/<test>/:
npx playwright show-trace <path-to-trace.zip>.
playwright.config.ts sets screenshot: 'on' and video: 'on' (not
'only-on-failure'/'retain-on-failure') so every test, pass or fail,
leaves a screenshot and a video — that's what makes the report skimmable
and watchable at a glance instead of a bare pass/fail list with evidence
only on failure.
All output lives under docs/qa/
playwright.config.ts routes every generated artifact into docs/qa/,
next to the matrix file test-case-matrix writes
(docs/qa/<slug>/test-matrix.md) — one place for everything QA-related
instead of loose folders scattered at the project root:
docs/qa/playwright-report/— Playwright's own html report, with video speed controls added bybuild_report.py, see "Playwright's own report, plus slow-motion video" above.docs/qa/playwright-results.json— machine-readable results;run_e2e.py'sRESULTS_PATHandbuild_report.py'sRESULTS_PATHboth read this exact path, so if you change theoutputFilein config, update both scripts.docs/qa/test-results/— raw per-test artifacts (screenshots, videos, trace.zip for every test) viaoutputDir.
Add docs/qa/playwright-report/, docs/qa/playwright-results.json,
docs/qa/test-results/, and docs/qa/*/test-matrix.html to .gitignore
— all of these are regenerated on every run, don't commit them (the
.html render of a matrix is derived from the .md and can go stale the
moment the .md is hand-edited, so it's a build output, not a second
source of truth). docs/qa/<slug>/test-matrix.md (from
test-case-matrix) is the one thing under docs/qa/ that should be
committed — it's a planning artifact, not a build output.
Test data hygiene — not just artifact cleanup
Everything in "All output lives under docs/qa/" above is about report
artifacts (screenshots, videos, JSON results) — regenerated files, cleaned
up via .gitignore. That's a different problem from application data
these E2E specs create by driving the real UI (a signed-up user, a placed
order) — that data lands in whatever database the app under test is
actually connected to, .gitignore does nothing for it, and left alone it
accumulates in that database run after run.
Because a browser-driven E2E test always goes over the network to a real
running app, it is always the "real DB, black-box" case described in
api-testing's
references/db-strategy-and-cleanup.md
— transaction rollback never applies here. Tagging and teardown are
mandatory, not optional, whenever a spec creates data:
- Tag every record a spec creates during the run (a
run_idgenerated once per suite invocation, or a fixed prefix liketest+e2e@example.testfor emails). - Add a Playwright
globalTeardown(seeplaywright.config.ts'sglobalTeardownoption) that deletes everything tagged with this run's id, through the app's own API where possible. - Also keep a standalone cleanup script the user can run manually if
a run crashed before
globalTeardownfired — adaptapi-testing'sassets/cleanup_test_data.pyrather than writing one from scratch. It must be idempotent: running it with nothing left to delete is a no-op, not an error.
Don't report an E2E suite "set up" or "passing" while it creates real records and neither of these exists — that's exactly the kind of silent data pollution this section exists to prevent.
Files in this skill
scripts/run_e2e.py— the test runner/orchestrator (stdlib-only Python); callsbuild_report.pyautomatically after every runscripts/build_report.py— post-processesdocs/qa/playwright-report/index.html(Playwright's own report) to add video speed controls and a "Test Matrix" link menu (stdlib-only Python, see "Playwright's own report, plus slow-motion video" above); also renders everydocs/qa/<slug>/test-matrix.mdto a siblingtest-matrix.html. Can be run standalone to redo all of this without rerunning the suite.assets/playwright.config.ts— ready-to-use Playwright configassets/step-shot-helper.ts— thestepShotpattern from step 2, add to the project's test fixturesassets/pre-push-hook.sh— optional local git pre-push hook, see step 5references/tdd-e2e-workflow.md— red-green-refactor cycle applied to E2E tests specifically, and how it relates totest-driven-development
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.

