# Comprehensive Testing Strategy ## Test Pyramid & Categories ```text ┌────────────────┐ │ E2E Playwright│ Storefront & POS Flow ├────────────────┤ │ Integration │ FastAPI + MySQL + Redis ├────────────────┤ │ Unit Tests │ Pydantic + Service Layer └────────────────┘ ``` --- ## Mandatory Test Suites 1. **Unit Tests (`pytest`)**: Verify business logic, tax formulas, and stock bucket calculations. 2. **API Tests**: Execute API contract validations against all 12 router files. 3. **POS Sync Idempotency Tests**: Simulate duplicate `pos_transaction_id` posts under simulated network retries. 4. **Payment Webhook Verification Tests**: Validate HMAC-SHA256 signature pass/fail paths.