1.1 KiB
1.1 KiB
E2E Testing
End-to-end testing for the Invoice Field Extraction API.
When to Use
- Testing complete inference pipeline (PDF -> Fields)
- Verifying API endpoints work end-to-end
- Validating YOLO + OCR + field extraction integration
- Pre-deployment verification
Workflow
- Ensure server is running:
python run_server.py - Run health check:
curl http://localhost:8000/api/v1/health - Run E2E tests:
pytest tests/e2e/ -v - Verify results and capture any failures
Critical Scenarios (Must Pass)
- Health check returns
{"status": "healthy", "model_loaded": true} - PDF upload returns valid response with fields
- Fields extracted with confidence scores
- Visualization image generated
- Cross-validation included for invoices with payment_line
Checklist
- Server running on http://localhost:8000
- Health check passes
- PDF inference returns valid JSON
- At least one field extracted
- Visualization URL returns image
- Response time < 10 seconds
- No server errors in logs
Test Location
E2E tests: tests/e2e/
Sample fixtures: tests/fixtures/