AI Agent Testing Pyramid

From Unit TDD to Adversarial "Judgment Day" Protocols

ADVERSARIAL Judgment Day STATEFUL INTEGRATION WhatsApp Flow Sim REAL DATA INTEGRATION MINSAL / FONASA Data UNITARY + TDD Business Logic (Vitest) Determinism 100% Chaos / Uncertainty

Foundations (L1 & L2)

  • • Vitest + Prisma Mocks
  • • FONASA Pricing Logic
  • • Real MINSAL Knowledge Base
  • • ServiceRequest Validation

System Flow (L3)

  • • Conversation State Tracking
  • • OCR to Order Pipeline
  • • Payment Confirmation Webhooks
  • • DiagnosticReport Delivery

Robustness (L4)

  • • Dual-Agent Verification
  • • Redundant Reasoning
  • • Prompt Injection Immunity
  • • Error Recovery Monitoring