webapp-testing
/webapp-testing
Opracowuje strategię E2E, skrypty Playwright oraz kontrole wizualne i dostępności dla aplikacji w przeglądarce.
- Autor
- jeffersonvalente ↗
- Repozytorium
- cardume ↗
- Licencja
- MIT
- Ostatnia zmiana repozytorium
- 04.11.2026
Ocena i bezpieczeństwo
- Pliki w paczce
- 2
- Skrypty
- 1
- Komentarze HTML
- 0
- Adresy URL w SKILL.md
- 1
Brak sygnałów. Repozytorium zmienione 04.11.2026, bez odwołań do wycofanych modeli i API.
MIT, otwarta: można używać i zmieniać, z zachowaniem informacji o autorze.
- 1 skrypt w paczce. Przejrzyj je przed instalacją, bo Claude może je uruchomić.
Skrypty: scripts/playwright_runner.py
Co robi i kiedy
Opracowuje strategię E2E, skrypty Playwright oraz kontrole wizualne i dostępności dla aplikacji w przeglądarce.
Oryginalny opis (EN)
E2E strategy, Playwright scripts, and visual and accessibility checks. Use when testing a web app in a browser or auditing a deployed URL.
Jak działa
- 🔧 Runtime Scripts
- 1. Deep Audit Approach
- 2. Testing Pyramid for Web
- 3. E2E Test Principles
- 4. Playwright Principles
- 5. Visual Testing
- 6. API Testing Principles
- 7. Test Organization
- 8. CI Integration
- 9. Anti-Patterns
Podgląd SKILL.md
---
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.
Pliki w paczce (2)
- SKILL.md 5 KB
- scripts/playwright_runner.py 6 KB
Wersje
| Repozytorium | Wynik | Licencja |
|---|---|---|
| Ta strona · jeffersonvalente/cardume | 100 | MIT |
| Navinspire-ia/navin | 100 | AGPL-3.0 |
| Reprograme/redevkit | 100 | MIT |
| wrongstack/wrongstack | 100 | MIT |
| baysao/dot.agents | 100 | Apache-2.0 |
| patriotai/ai-lab | 100 | MIT |
| khaledsaeed18/dotclaude | 100 | MIT |
| alebgl77/claude-inc | 100 | MIT |
| JZKK720/cubecloud-skills-bundle-kit | 100 | MIT |
Migawka bazy z 13.11.2026 · wersja paczki b4a885ebb759 (skrót SHA-256 całej paczki)
Pobrania w ostatnich 30 dniach: 0 · ranking
Zgłoś problem z tym skillem: szkodliwa treść, błędny opis albo prośba autora o usunięcie.
Podobne skille
- 95memstack-development-webapp-testing
Pisze testy przeglądarkowe end-to-end w Playwright, sprawdzające działanie interfejsu aplikacji webowej. - 100webapp-tester
Projektuje strategię testów aplikacji webowych, przypadki testowe i zapewnienie jakości: plan testów, testy end-to-end w Playwright lub Cypress, zestawy testów integracyjnych API, listy kontrolne dostępności i luki w pokryciu. - 90e2e
Pisze i uruchamia testy end-to-end w Playwright dla ścieżki użytkownika: lokalizatory, dane testowe, sprawdzenia dostępności i ślady błędów. - 100webapp-visual-testing
Weryfikuje wizualnie interfejs w przeglądarce przy zgłoszonych błędach układu i regresjach wizualnych, sprawdza dostępność komponentów interaktywnych i przeprowadza przepływy end-to-end. - 100webapp-browser
Testuje lokalną aplikację Rolebase w Playwright jako administrator testowy, sprawdza zmiany interfejsu i robi zrzuty ekranu. - 100browser-debugging
Bada błędy interfejsu webowego, regresje wizualne i wydajność przeglądarki, w tym skrypty Playwright, konsolę i sieć.