testing-mastery

Unified testing skill — TDD workflow, unit/integration patterns, E2E/Playwright strategies. Replaces tdd-workflow + testing-patterns + webapp-testing.

Safety Notice

This listing is imported from skills.sh public index metadata. Review upstream SKILL.md and repository scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "testing-mastery" with this command: npx skills add tai-ch0802/skills-bundle/tai-ch0802-skills-bundle-testing-mastery

Testing Mastery — Unified Testing Skill

Write tests that document intent, catch regressions, and run fast. Choose the right strategy for the right situation.


Decision Tree: Which Testing Strategy?

Is this a new feature?
├─ YES → Use TDD (see references/tdd-cycle.md)
│        Write failing test → Minimal code → Refactor
└─ NO
   ├─ Is this a bug fix?
   │  └─ YES → Write regression test first, then fix
   ├─ Is this a critical user flow (login, checkout)?
   │  └─ YES → E2E test (see references/e2e-playwright.md)
   └─ Is this business logic / data transformation?
      └─ YES → Unit + Integration tests (see references/unit-integration.md)

Testing Pyramid

        /\          E2E (Few, ~10%)
       /  \         Critical user flows only
      /----\
     /      \       Integration (Some, ~20%)
    /--------\      API, DB, service contracts
   /          \
  /------------\    Unit (Many, ~70%)
                    Functions, classes, utilities

Core Principles

PrincipleRule
AAAArrange → Act → Assert
FastUnit < 100ms, Integration < 1s
IsolatedNo test depends on another
BehaviorTest WHAT, not HOW
MinimalOne assertion per test (ideally)

Quick Reference

I need to...UseReference
Build feature test-firstTDD (RED-GREEN-REFACTOR)tdd-cycle.md
Write unit/integration testsMocking, data strategies, patternsunit-integration.md
Test critical user flows in browserE2E with Playwrighte2e-playwright.md

Anti-Patterns (Universal)

❌ Don't✅ Do
Test implementation detailsTest observable behavior
Write tests after shippingWrite tests before/during
Duplicate test codeUse factories & fixtures
Complex test setupSimplify or split
Ignore flaky testsFix root cause
Skip cleanupReset state in teardown
Multiple asserts per testOne behavior per test

🔧 Runtime Scripts

ScriptPurposeCommand
scripts/test_runner.pyUnified test executionpython scripts/test_runner.py <project_path>
scripts/playwright_runner.pyBrowser E2E testingpython scripts/playwright_runner.py <url>
With screenshotpython scripts/playwright_runner.py <url> --screenshot
Accessibility checkpython scripts/playwright_runner.py <url> --a11y

Remember: The test is the specification. If you can't write a test for it, you don't understand the requirement.

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

Automation

parallel-agents

No summary provided by upstream source.

Repository SourceNeeds Review
Automation

tdd-workflow

No summary provided by upstream source.

Repository SourceNeeds Review
General

prd

No summary provided by upstream source.

Repository SourceNeeds Review
General

skill-creator

No summary provided by upstream source.

Repository SourceNeeds Review