Skip to content
Skills Library
Programming · Testing

webapp-testing

/webapp-testing

E2E strategy, Playwright scripts, and visual and accessibility checks. Use when testing a web app in a browser or auditing a deployed URL.

Repository
cardume ↗
Licence
MIT
Last repository change
04.11.2026

Assessment and security

100/ 100Class: good
Format25 / 25
Frontmatter with name and description, valid name, description up to 1,024 characters, name matching the folder.
Discoverability25 / 25
Description explains when to use the skill, has a reasonable length and uses third person.
Content35 / 35
At least 150 words and at most 500 lines, headings, step lists, examples or code.
Hygiene15 / 15
No placeholders such as TODO, no Windows paths, with a licence.
Riskno signals detected in the scan
Files in this package
2
Scripts
1
HTML comments
0
URLs in SKILL.md
1
Deprecation

No signals detected. Repository changed on 04.11.2026, without references to retired models or APIs.

Licence

MIT, open: use and modify while retaining author attribution.

What to check before installing
  • 1 scripts in this package. Review them before installing, as Claude may execute them.

Scripts: scripts/playwright_runner.py

What it does and when to use it

E2E strategy, Playwright scripts, and visual and accessibility checks. Use when testing a web app in a browser or auditing a deployed URL.

Original author description

E2E strategy, Playwright scripts, and visual and accessibility checks. Use when testing a web app in a browser or auditing a deployed URL.

How it works

  1. 🔧 Runtime Scripts
  2. 1. Deep Audit Approach
  3. 2. Testing Pyramid for Web
  4. 3. E2E Test Principles
  5. 4. Playwright Principles
  6. 5. Visual Testing
  7. 6. API Testing Principles
  8. 7. Test Organization
  9. 8. CI Integration
  10. 9. Anti-Patterns
Original SKILL.md headings · 195 lines, 734 words
SKILL.md preview
---
name: webapp-testing
description: "E2E strategy, Playwright scripts, and visual and accessibility checks. Use when testing a web app in a browser or auditing a deployed URL."
allowed-tools: Read Write Edit Glob Grep Bash
compatibility: "Claude Code with the Cardume plugins (uses cardume-* commands, subagents or plugin paths); the guidance itself is portable."
---

# Web App Testing

> Discover and test everything. Leave no route untested.

## 🔧 Runtime Scripts

**Execute these for automated browser testing:**

| Script | Purpose | Usage |
|--------|---------|-------|
| `cardume-playwright-runner` (wraps `scripts/playwright_runner.py`) | Basic browser test | `cardume-playwright-runner https://example.com` |
| | With screenshot | `cardume-playwright-runner <url> --screenshot` |
| | Accessibility check | `cardume-playwright-runner <url> --a11y` |

**Requires:** `pip install playwright && playwright install chromium`

---

## 1. Deep Audit Approach

### Discovery First

| Target | How to Find |
|--------|-------------|
| Routes | Scan app/, pages/, router files |
| API endpoints | Grep for HTTP methods |
| Components | Find component directories |
| Features | Read documentation |

### Systematic Testing

1. **Map** - List all routes/APIs
2. **Scan** - Verify they respond
3. **Test** - Cover critical paths

---

## 2. Testing Pyramid for Web

```
        /\          E2E (Few)
       /  \         Critical user flows
      /----\
     /      \       Integration (Some)
    /--------\      API, data flow
   /          \
  /------------\    Component (Many)
                    Individual UI pieces
```

---

## 3. E2E Test Principles

### What to Test

| Priority | Tests |
|----------|-------|
| 1 | Happy path user flows |
| 2 | Authentication flows |
| 3 | Critical business actions |
| 4 | Error handling |

### E2E Best Practices

| Practice | Why |
|----------|-----|
| Role-based locators (`getByRole`, `getByLabel`, `getByText`) | Resilient, user-facing, accessibility-aware |
| `getByTestId` as fallback | When no role/text locator fits (not user-facing) |
| Avoid CSS/XPath selectors | DOM changes break them |
| Wait for elements | Avoid flaky tests |
| Clean state | Independent tests |
| Avoid implementation details | Test user behavior |

---

## 4. Playwright Principles

### Core Concepts

| Concept | Use |
|---------|-----|
| Page Object Model | Encapsulate page logic |
| Fixtures | Reusable test setup |
| Assertions | Built-in auto-wait |
| Trace Viewer | Debug failures |
| Aria snapshots | `expect(locator).toMatchAriaSnapshot(...)` asserts the accessibility tree as YAML; update with `npx playwright test -u` |

### Configuration

| Setting | Recommendation |
|---------|----------------|
| Retries | 2 on CI |
| Trace | on-first-retry |
| Screenshots | on-failure |
| Video | retain-on-failure |

### AI-Assisted Testing

| Tool | What it does |
|------|--------------|
| **Playwright test agents** (`npx playwright init-agents --loop=claude`) | **planner** explores the app and writes a Markdown plan in `specs/`; **generator** turns plans into test files, verifying selectors live; **healer** runs failing tests and repairs them. Uses a `seed.spec.ts` for setup. Re-run `init-agents` after upgrading Playwright. |
| **Playwright MCP** (`@playwright/mcp`) | MCP server for browser automation via the accessibility tree (not screenshots). Claude Code: `claude mcp add playwright npx @playwright/mcp@latest` |

> Review agent-generated tests like any other code: check that assertions test behavior, not just that the page loaded.

---

## 5. Visual Testing

### When to Use

| Scenario | Value |
|----------|-------|
| Design system | High |
| Marketing pages | High |
| Component library | Medium |
| Dynamic content | Lower |

### Strategy

- Baseline screenshots
- Compare on changes
- Review visual diffs
- Update intentional changes

---

## 6. API Testing Principles

### Coverage Areas

| Area | Tests |
|------|-------|
| Status codes | 200, 400, 404, 500 |
| Response shape | Matches schema |
| Error messages | User-friendly |
| Edge cases | Empty, large, special chars |

---

## 7. Test Organization

### File Structure

```
tests/
├── e2e/           # Full user flows
├── integration/   # API, data
├── component/     # UI units
└── fixtures/      # Shared data
```

### Naming Convention

| Pattern | Example |
|---------|---------|
| Feature-based | `login.spec.ts` |
| Descriptive | `user-can-checkout.spec.ts` |

---

## 8. CI Integration

### Pipeline Steps

1. Install dependencies
2. Install browsers
3. Run tests
4. Upload artifacts (traces, screenshots)

### Parallelization

| Strategy | Use |
|----------|-----|
| Per file | Playwright default |
| Sharding | Large suites |
| Workers | Multiple browsers |

---

## 9. Anti-Patterns

| ❌ Don't | ✅ Do |
|----------|-------|
| Test implementation | Test behavior |
| Hardcode waits | Use auto-wait |
| Skip cleanup | Isolate tests |
| Ignore flaky tests | Fix root cause |

---

> **Remember:** E2E tests are expensive. Use them for critical paths only.
Files in this package (2)
  • SKILL.md 5 KB
  • scripts/playwright_runner.py 6 KB

Versions

RepositoryScoreLicence
This page · jeffersonvalente/cardume100MIT
Navinspire-ia/navin100AGPL-3.0
Reprograme/redevkit100MIT
wrongstack/wrongstack100MIT
baysao/dot.agents100Apache-2.0
patriotai/ai-lab100MIT
khaledsaeed18/dotclaude100MIT
alebgl77/claude-inc100MIT
JZKK720/cubecloud-skills-bundle-kit100MIT

Database snapshot: 13.11.2026 · package version b4a885ebb759 (SHA-256 digest of the entire package)

Downloads in the last 30 days: 0 · ranking

Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.

Similar skills

  • 95memstack-development-webapp-testing
    Use when the user says 'write browser tests', 'test this page', 'playwright test', 'e2e test', 'end to end test', 'browser test', 'test the UI', or needs Playwright-based browser testing for a web application. Do NOT use for unit tests, API tests, or non-browser testing.
  • 100webapp-tester
    Activates WebAppTester for automated web application testing strategy, test case design, and quality assurance. Use when you need to design a test plan for a web app, write Playwright or Cypress end-to-end tests, create API integration test suites, design accessibility test…
  • 90e2e
    Writes and runs Playwright end-to-end tests for a user journey: role-based locators, auth storage state, test data setup, axe accessibility checks, mobile viewport, and trace debugging. Uses the webapp-testing skill and Playwright MCP when installed. Use for testing a journey through the real app.
  • 100webapp-visual-testing
    Use when a browser-facing UI needs visual verification, a layout bug or visual regression is reported, accessibility of an interactive component needs checking, or a browser workflow must be exercised end-to-end.
  • 100webapp-browser
    Test anything in the local Rolebase webapp with the Playwright browser, signed in as a local test admin, with few tokens. Use to check a UI change, open a page or modal, take a screenshot, or test a flow end to end in the webapp (including /admin).
  • 100browser-debugging
    Investigate web UI failures, visual regressions, and browser performance. Use for browser testing, Playwright scripts, screenshots, console or network inspection, and cross-browser reproduction.

Feedback and reports

Your message goes to Bartosz Sokoliński. An email address is needed only for a reply. See the privacy policy.