← ClaudeAtlas

testing-strategylisted

Enforces test doctrine where shape follows code not the pyramid: pushes logic into Flutter-free packages tested with pure package:test and an injected Clock; asserts invariants with seeded fuzz tests against an independent oracle plus round-trip and rounding goldens; prefers bare-implements fakes over mocktail for code you own; tests the data layer against a real NativeDatabase.memory Drift engine, never a mocked DAO; drives Notifiers headlessly with ProviderContainer overrides; guards one end-to-end acceptance gate and a runtime invariant tripwire; floors coverage on unrecoverable-bug files not a global percentage; and fixes the coverage-lies-upward gap. Use when writing tests under test/ or integration_test/, choosing unit vs widget vs integration, adding a fuzz or round-trip property, wiring a fake or ProviderContainer test, gating coverage, or triaging a flaky-suite failure.
zakariaf/CatchLaw · ★ 0 · Testing & QA · score 58
Install: claude install-skill zakariaf/CatchLaw
# Testing Strategy Tests are the only correctness instrument you control at build time: shape the suite to the code, not to a decades-old ratio, and make each test assert behaviour a build either passes or fails. Applies to every test under `test/` and `integration_test/`. Read the reference for the task at hand: - `references/test-layers.md` — per-layer harness, imports, teardown, edge tables (pure core, in-memory Drift, headless Notifier, integration). - `references/property-and-fakes.md` — fakes-over-mocks, enum-driven fake state, seeded fuzz, independent oracles, absence-of-a-failure-class tests. - `references/coverage-and-budget.md` — file-level floors, the coverage-lies-upward fix, the suite-time budget, and the manual-pass handoff. Run `scripts/check_test_hygiene.sh` and `scripts/run_tests.sh` before a PR. Golden, RTL, and a11y widget mechanics live in `widget-golden-and-a11y-testing`; this skill governs everything below the pixel. ## Non-negotiable rules 1. **Shape the suite to the code, not the pyramid.** The 70/20/10 numbers trace to a 2011 test-*size* heuristic (its author said they were "pulled out of a hat") and never described Flutter's unit/widget/integration taxonomy. Test at the **cheapest tier that can assert the behaviour**: anything expressible as `f(input) -> output` is a unit or property test, never a `pumpWidget`. Driving pure logic through the widget tree is slower, flakier, and hides which layer broke. 2. **Put business rules in a