Complete testing instructions to verify all features work before deployment.
# 1. Verify all files exist
Test-Path frontend/src/constants.ts
Test-Path frontend/src/types/index.ts
Test-Path frontend/src/components/VideoFeed.tsx
Test-Path frontend/src/components/Dashboard/Dashboard.tsx
Test-Path frontend/src/hooks/useMonitoring.ts
Test-Path frontend/src/hooks/useCamera.ts
Test-Path frontend/src/services/geminiService.ts
# 2. Verify environment variables
cat frontend/.env.local
# Should show VITE_GEMINI_API_KEY=your_key
# 3. Install dependencies
cd frontend
npm install
# 4. Check for TypeScript errors
npm run type-check # or: npx tsc --noEmit
Expected Result: All files exist, no TypeScript errors.
cd frontend
npm run build
Expected Output:
โ 50 modules transformed.
dist/index.html 0.45 kB โ gzip: 0.30 kB
dist/assets/index-XXXXXXXX.css 5.21 kB โ gzip: 1.89 kB
dist/assets/index-XXXXXXXX.js 245.67 kB โ gzip: 78.12 kB
โ built in 3.5s
โ If Failed: Check TypeScript errors above.
cd frontend
npm run dev
Expected Output:
VITE v6.2.0 ready in 450 ms
โ Local: http://localhost:3000/
โ Network: use --host to expose
Open: http://localhost:3000
Expected UI:
Steps:
Expected Result:
โ If Camera Fails:
Steps:
Expected Result:
Console Output:
โ
Gemini AI initialized successfully
๐ธ Processing frame...
Analysis complete: { incident: false, type: "normal", ... }
Scenario A: Gun Gesture
Steps:
Expected Result:
Scenario B: Suspicious Behavior
Steps:
Expected Result:
Scenario C: Normal Activity
Steps:
Expected Result:
Real-time Chart:
Stats Cards:
Event Log (Terminal):
[HH:MM:SS] INFO @normal or [HH:MM:SS] ALRT @threat# From project root
docker-compose build
Expected Output:
[+] Building 45.2s (12/12) FINISHED
=> [backend] ...
=> [frontend] ...
Successfully built
โ If Failed: Check Dockerfile syntax and file paths.
docker-compose up
Expected Output:
aegisai-backend | โ
AegisAI Backend Ready
aegisai-frontend | ready started server on 0.0.0.0:3000
Access:
Test API:
curl http://localhost:8000/health
# Expected: {"status":"healthy","components":{...}}
curl http://localhost:8000/api/stats
# Expected: {"total_incidents":0,"active_incidents":0,...}
cd backend
source venv/bin/activate # Windows: venv\Scripts\activate
python main.py
Expected Output:
INFO: โ
AegisAI Backend Ready
INFO: ๐ก API: http://0.0.0.0:8000
INFO: ๐ Docs: http://0.0.0.0:8000/docs
INFO: Uvicorn running on http://0.0.0.0:8000
Test Endpoints:
# Health check
curl http://localhost:8000/health
# Get incidents
curl http://localhost:8000/api/incidents
# Get stats
curl http://localhost:8000/api/stats
cd backend
source venv/bin/activate
python -m services.video_processor demo
Expected Output:
๐ฌ Starting AegisAI Demo Scenario
=== SCENARIO 1: Normal Activity ===
โ No incident detected
=== SCENARIO 2: Suspicious Behavior ===
โ Detected: suspicious_behavior
Severity: medium
Confidence: 82%
=== SCENARIO 3: Critical Threat ===
โ Detected: violence
Severity: high
Response plan: 5 actions
โ Demo sequence completed
Setup:
# Terminal 1: Backend
cd backend
source venv/bin/activate
python main.py
# Terminal 2: Frontend
cd frontend
npm run dev
Test Flow:
Frontend connects to backend:
Create incident via frontend:
Verify database:
sqlite3 backend/aegis.db
SELECT * FROM incidents;
Should show saved incidents.
Query via API:
curl http://localhost:8000/api/incidents
Should return incidents created via frontend.
Duration: Run for 5 minutes
Metrics to Monitor:
Monitor:
# In browser console (F12)
performance.memory.usedJSHeapSize / 1048576
# Should stay relatively stable
Scenario: Rapid threat changes
Steps:
Solution:
cd frontend
echo "VITE_GEMINI_API_KEY=your_actual_key" > .env.local
Solutions:
Solution:
rm -rf node_modules package-lock.json
npm install
npm run build
Solution: Ensure backend is running and CORS_ORIGINS in .env includes frontend URL.
Solution:
SYSTEM_INSTRUCTION in constants.ts# AegisAI Test Report
**Date**: YYYY-MM-DD
**Tester**: [Your Name]
**Environment**: [Local/Docker/Production]
## Test Results
| Test | Status | Notes |
|------|--------|-------|
| Build | โ
/โ | |
| Camera | โ
/โ | |
| Monitoring | โ
/โ | |
| Threat Detection | โ
/โ | X/10 attempts successful |
| Dashboard | โ
/โ | |
| Backend API | โ
/โ | |
| Docker | โ
/โ | |
## Issues Found
1. [Description]
- Severity: High/Medium/Low
- Steps to reproduce:
- Expected vs Actual:
## Performance Metrics
- Memory: XXX MB
- CPU: XX%
- Response Time: X.X seconds
## Recommendation
[ ] Ready for deployment
[ ] Needs fixes (see issues above)
If all tests pass:
# Tag release
git tag -a v2.5.0 -m "Production release"
git push origin v2.5.0
# Deploy
# See DEPLOYMENT.md for instructions
Good luck with testing! ๐