Skills DirectorySkills Directory
SkillsLearnSecurityCategoriesDocsBlogPro
Sign InSubmit Skill
Skills Directory

Security-tested agent skills for Claude, coding agents, and AI workflows.

Directory

  • Browse Skills
  • All Skills A–Z
  • Claude Skills
  • Claude Code Skills
  • Agent Skills
  • Categories
  • Authors
  • Submit a Skill

Learn

  • Learn Hub
  • Install Claude Skills
  • Write SKILL.md
  • Skills vs MCP
  • Directories Compared

Security

  • Security
  • Methodology
  • Secure Claude Skills
  • Security Badges
  • Chrome Extension
  • Skill Manager

Company

  • About
  • Community
  • Blog
  • API Docs
  • Advertise

2026 Skills Directory. All rights reserved.

ProTermsPrivacyRefunds
Back to skills

Webapp Testing

ASecurity

Strategy and practice for testing web applications: test pyramid, critical user journeys, flaky-test control, and CI integration. Use when setting up or improving a web app's test suite.

2 stars
0 votes
0 copies
0 views
Added 9/29/2026
ai-agentsrustgotestingdebuggingapidatabasedocumentation

Works with

cliapi

Security Analysis

A100/100

Scanned 9/29/2026

$npx -y skills add aicodedecode/awesome-muse-skills --skill webapp-testing --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Webapp Testing?

Add the live security badge to your README — it updates automatically with every re-scan.

Security grade badge for Webapp Testing
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/aicodedecode-webapp-testing/badge)](https://www.skillsdirectory.com/skills/aicodedecode-webapp-testing)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
Files
SKILL.md
---
name: webapp-testing
description: Strategy and practice for testing web applications: test pyramid, critical user journeys, flaky-test control, and CI integration. Use when setting up or improving a web app's test suite.
category: development
---

# Webapp Testing

## Overview

Testing a web application means answering one question reliably: **can a user still do the important
things?** This skill covers the strategy layer — which tests to write, how many of each, how to keep
them fast and trustworthy — and the practice layer: testing critical journeys, controlling flakiness,
and wiring it all into CI so the suite is a gate, not a suggestion.

The goal is a suite developers trust: green means shippable, red means a real problem, and nobody
ignores it.

## When to use

- Setting up testing for a new web application.
- A test suite that's slow, flaky, or routinely ignored.
- Deciding what to test before a launch or major refactor.
- Debugging flaky tests that pass locally and fail in CI.
- Balancing unit, integration, and end-to-end coverage.

## Core concepts

- **The test pyramid (adapted for web).** Many fast unit tests for logic; a solid middle layer of
  integration/API tests for the seams; a small number of end-to-end tests for critical user journeys.
  Invert it (hundreds of E2E tests) and you get a slow, flaky suite nobody trusts.
- **Test the journey, not the implementation.** E2E tests should assert user-visible outcomes ("user
  can check out"), not CSS selectors or internal state. Implementation-coupled tests break on every
  refactor and teach teams to delete tests instead of fixing them.
- **Flakiness is a bug in the test.** A test that fails 5% of the time will be ignored 100% of the
  time. Common causes: timing assumptions (fixed sleeps), shared mutable state, test-order
  dependence, real network calls. Quarantine flaky tests immediately; fix or delete within days.
- **Test data strategy.** Each test creates what it needs and cleans up after itself (or runs in a
  transaction rolled back afterward). Shared seed databases that tests mutate are a flakiness factory.
- **CI as the gate.** Tests run on every PR, in parallel, with artifacts (screenshots, videos,
  traces) on failure. Main-branch protection requires green. A suite that doesn't block merges is
  documentation with extra steps.
- **What "done" means.** Coverage is a side effect, not a target. The target: every critical journey
  has an automated test, every bug fix adds a regression test, and the suite runs in minutes.

## Practical workflow

1. **List critical journeys.** The 5–10 things that must never break (signup, login, checkout,
   core workflow). These get E2E tests first — before anything else.
2. **Layer the suite:**
   - Unit: pure logic, validators, utilities, state reducers — fast, no I/O.
   - Integration/API: endpoints with a real test database — request in, assert response + side effects.
   - E2E: critical journeys in a real browser against a production-like build.
3. **Stabilize the harness.** Dedicated test environment, seeded deterministically; mock only at
   true boundaries (payment gateways, email) — and contract-test the mocks.
4. **Kill flakiness systematically.** Replace sleeps with explicit waits ("wait for element X");
   isolate tests (no shared state); retry only to *detect* flakiness, never to hide it — a test
   that needs retries is a test to fix.
5. **Speed it up.** Parallelize by file, split slow E2E into a nightly job vs a fast PR gate,
   keep the PR suite under ~10 minutes. Slow suites get skipped; skipped suites are worthless.
6. **Make failures actionable.** On failure: screenshot/video, console logs, network trace, and the
   exact seed/data used. A developer should reproduce in one command: `npm run test:e2e -- --grep
   "checkout flow"`.

Example layering for a SaaS app:

```text
Unit (hundreds, seconds):     pricing calc, input validation, permission checks
API/integration (dozens, ~2 min):  POST /orders creates order + decrements stock;
                                   unauthorized requests rejected; webhooks verified
E2E (8 journeys, ~6 min):     signup → create project → invite teammate → upgrade plan
Nightly (slow):               full cross-browser matrix, load smoke, a11y audit
```

## Common pitfalls

- **Testing through the UI what belongs in API tests.** Form validation logic tested via browser
  clicks is slow and brittle — push it down to unit/API level and keep E2E for the journey.
- **Fixed sleeps.** `sleep(2000)` passes until CI is slow, then flakes. Wait on conditions, not clocks.
- **Shared test accounts/data.** Two tests mutating the same user record will eventually collide.
  Isolate: unique data per test run.
- **Mocking the system under test.** Mocking your own database layer in an "integration" test just
  tests the mock. Mock at external boundaries only.
- **100% coverage mandates.** Drives tests of getters and trivial code while critical journeys go
  untested. Cover behavior that matters; measure journey coverage, not line coverage.
- **E2E against dev servers with hot-reload.** Test the production build — dev-only behavior
  (extra warnings, different bundling) hides real bugs and creates fake ones.
- **Ignoring the suite.** The moment a red build merges, the suite's authority dies. Protect main,
  fix red immediately, and treat "just rerun it" as a flakiness report, not a solution.

Attribution

aicodedecodeaicodedecode
View sourceSee grades on GitHubMore from aicodedecode →
SSkills DirectorySkills Directory

Ship a skill? Prove it's safe.

Free 120-pattern security scan, letter grade, and an embeddable README badge.

Submit a skill

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments (0)

No comments yet. Be the first to comment!

SSkills DirectorySkills Directory

Ship a skill? Prove it's safe.

Free 120-pattern security scan, letter grade, and an embeddable README badge.

Submit a skill

Related Skills

Caveman

Terse caveman voice: answer first, fluff gone, every technical fact kept. Use for /caveman, "caveman mode", "talk like caveman", "be brief", "less tokens". Stays on until "stop caveman" or "normal mode".

1100021 votes

Hyperplan

Adversarial multi-agent planning skill. Self-orchestrates 5 hostile category members (unspecified-low, unspecified-high, deep, ultrabrain, artistry) via team-mode for ruthless cross-critique debate, distills only the defensible insights, then MANDATORILY hands the distilled insight bundle to the `plan` agent for executable plan formalization. Use when planning needs maximum rigor and surfacing of weak assumptions, blind spots, and over-engineering. Triggers: 'hyperplan', 'hpp', '/hyperplan', ...

698461 votes

Writing Skills

Create and manage Claude Code skills in HASH repository following Anthropic best practices. Use when creating new skills, modifying skill-rules.json, understanding trigger patterns, working with hooks, debugging skill activation, or implementing progressive disclosure. Covers skill structure, YAML frontmatter, trigger types (keywords, intent patterns), UserPromptSubmit hook, and the 500-line rule. Includes validation and debugging with SKILL_DEBUG. Examples include rust-error-stack, cargo-dep...

3931 votes

Mcp Code Execution

Routes multi-tool workflows through MCP servers for large datasets and pipelines. Use when Bash tool overhead is limiting throughput on data-heavy tasks.

3421 votes

catchup

Recovers the conversation and failed tool calls of a previous Codex, Amp, Claude Code, Antigravity, Cline, Copilot CLI, Cursor, DeepSeek Harness, Grok Build, Kimi, OpenCode, Pi Agent, or ZCode session. Use when the user says "catch up", "what did the last session do", "get me up to speed", "I switched agents", asks to recover/summarize a previous session before continuing, or asks to diagnose or report a catchup failure. Do NOT use for the current conversation, git history, or any non-agent log.

741 votes
View all in ai-agents →