← ClaudeAtlas

oracle-testinglisted

Stub-Driven TDD and layer boundary testing. Use when writing tests, deciding what to test, or testing at component boundaries.
martinffx/atelier · ★ 28 · Testing & QA · score 83
Install: claude install-skill martinffx/atelier
# Testing Skill Stub-Driven Test-Driven Development and layer boundary testing for functional core and effectful edge architecture. ## Core Principle: Stub-Driven TDD Test-Driven Development workflow for the functional core / effectful edge pattern: ``` 1. Stub → Create minimal interface/function signatures 2. Test → Write tests against stubs 3. Implement → Make tests pass with real implementation 4. Refactor → Improve code while keeping tests green ``` **Key insight:** Write interface signatures first, test against those, then implement—not the other way around. See [references/stub-driven-tdd.md] for complete workflow examples. ## Layer Boundary Testing Test at the boundaries between functional core and effectful edge, not internal implementation. ``` Test here ──────▼──────────────────▼────── Test here Effectful Edge │ Functional Core (stub) │ (unit test) ``` ### Where to Test Each Layer | Layer | Test Type | What to Stub | What to Assert | |-------|-----------|--------------|-----------------| | **Entity** | Unit | Nothing (pure) | Validation, rules, transforms | | **Service** | Unit | Repositories | Orchestration logic, error handling | | **Router** | Integration | Service | Status codes, response format | | **Repository** | Integration | DB connection | CRUD operations, queries | | **Consumer** | Integration | Service | Event parsing, service calls | See [references/boundaries.md] for detailed testing patterns