Continuous Testing
Fiecare modificare în agent trigger-uiește automat suite-ul de teste. Nicio schimbare nu ajunge în production fără validare automată.
Test Suite Structure
tests/
├── unit/
│ ├── intent_classification.test.ts
│ ├── entity_extraction.test.ts
│ └── response_generation.test.ts
├── integration/
│ ├── crm_integration.test.ts
│ ├── calendar_integration.test.ts
│ └── payment_integration.test.ts
├── e2e/
│ ├── booking_flow.test.ts
│ ├── support_flow.test.ts
│ └── sales_flow.test.ts
└── performance/
├── latency.test.ts
└── concurrent_calls.test.tsTest Example
describe('Booking Intent', () => {
test('should recognize booking intent', async () => {
const result = await agent.classify(
"Vreau să fac o programare pentru mâine"
);
expect(result.intent).toBe('booking');
expect(result.confidence).toBeGreaterThan(0.9);
});
test('should extract date entity', async () => {
const result = await agent.extractEntities(
"Programează-mă pentru vineri la 14:00"
);
expect(result.date).toBe('next_friday');
expect(result.time).toBe('14:00');
});
test('should handle booking flow end-to-end', async () => {
const conversation = await agent.simulate([
"Vreau o programare",
"Vineri la 14:00",
"Ion Popescu",
"Da, confirm"
]);
expect(conversation.outcome).toBe('booking_created');
expect(conversation.booking.date).toBeDefined();
});
});CI/CD Pipeline
1
Commit Trigger
Fiecare push declanșează pipeline-ul
2
Unit Tests
~30 secunde - testează componente individual
3
Integration Tests
~2 minute - testează integrările
4
E2E Simulation
~10 minute - conversații complete
✓
Deploy to Staging
Automat dacă toate testele trec
Coverage Requirements
90%+
Intent Coverage
85%+
Entity Coverage
95%+
Flow Coverage