{ "total_tests": 24, "passed": 7, "failed": 17, "errors": [ "WebSocket /ws/pose - Exception: server rejected WebSocket connection: HTTP 403", "WebSocket /ws/hardware - Exception: server rejected WebSocket connection: HTTP 403" ], "test_details": [ { "test_name": "GET /health/health", "description": "System health check", "url": "http://localhost:8000/health/health", "method": "GET", "expected_status": 200, "actual_status": 200, "response_time_ms": 1007.28, "response_data": { "status": "unhealthy", "timestamp": "2025-06-07T12:28:55.762672", "uptime_seconds": 0.0, "components": { "hardware": { "name": "Hardware Service", "status": "unhealthy", "message": "Health check failed: 'HardwareService' object has no attribute 'health_check'", "last_check": "2025-06-07T12:28:55.762672", "uptime_seconds": null, "metrics": null }, "pose": { "name": "Pose Service", "status": "healthy", "message": "Service is running normally", "last_check": "2025-06-07T12:28:55.762672", "uptime_seconds": 0.0, "metrics": { "total_processed": 7957, "success_rate": 1.0, "average_processing_time_ms": 0.7798933014955369 } }, "stream": { "name": "Stream Service", "status": "unhealthy", "message": "Health check failed: 'StreamService' object has no attribute 'health_check'", "last_check": "2025-06-07T12:28:55.762672", "uptime_seconds": null, "metrics": null } }, "system_metrics": { "cpu": { "percent": 42.2, "count": 2 }, "memory": { "total_gb": 7.75, "available_gb": 3.4, "used_gb": 3.99, "percent": 56.2 }, "disk": { "total_gb": 31.33, "free_gb": 7.99, "used_gb": 21.72, "percent": 69.34 }, "network": { "bytes_sent": 3735289492, "bytes_recv": 37107794581, "packets_sent": 1163504, "packets_recv": 25763938 } } }, "success": true, "timestamp": "2025-06-07T12:28:56.764536" }, { "test_name": "GET /health/ready", "description": "Readiness check", "url": "http://localhost:8000/health/ready", "method": "GET", "expected_status": 200, "actual_status": 200, "response_time_ms": 2.54, "response_data": { "ready": false, "timestamp": "2025-06-07T12:28:56.766715", "checks": {}, "message": "Readiness check failed: 'HardwareService' object has no attribute 'is_ready'" }, "success": true, "timestamp": "2025-06-07T12:28:56.767265" }, { "test_name": "POST /api/v1/pose/estimate", "description": "Basic pose estimation", "url": "http://localhost:8000/api/v1/pose/estimate", "method": "POST", "expected_status": 200, "actual_status": 404, "response_time_ms": 0.97, "response_data": { "error": { "code": 404, "message": "Not Found", "type": "http_error", "path": "/api/v1/pose/estimate" } }, "success": false, "timestamp": "2025-06-07T12:28:56.768369" }, { "test_name": "POST /api/v1/pose/estimate", "description": "Pose estimation with parameters", "url": "http://localhost:8000/api/v1/pose/estimate", "method": "POST", "expected_status": 200, "actual_status": 404, "response_time_ms": 0.87, "response_data": { "error": { "code": 404, "message": "Not Found", "type": "http_error", "path": "/api/v1/pose/estimate" } }, "success": false, "timestamp": "2025-06-07T12:28:56.769596" }, { "test_name": "POST /api/v1/pose/analyze", "description": "Pose analysis", "url": "http://localhost:8000/api/v1/pose/analyze", "method": "POST", "expected_status": 200, "actual_status": 401, "response_time_ms": 1.1, "response_data": { "error": { "code": 401, "message": "Authentication required", "type": "http_error", "path": "/api/v1/pose/analyze" } }, "success": false, "timestamp": "2025-06-07T12:28:56.771001" }, { "test_name": "GET /api/v1/pose/zones/zone_1/occupancy", "description": "Zone occupancy", "url": "http://localhost:8000/api/v1/pose/zones/zone_1/occupancy", "method": "GET", "expected_status": 200, "actual_status": 200, "response_time_ms": 1.35, "response_data": { "zone_id": "zone_1", "current_occupancy": 1, "max_occupancy": 10, "persons": [ { "person_id": "person_0", "confidence": 0.9419077493534322, "activity": "walking" } ], "timestamp": "2025-06-07T12:28:56.771914" }, "success": true, "timestamp": "2025-06-07T12:28:56.772481" }, { "test_name": "GET /api/v1/pose/zones/summary", "description": "All zones summary", "url": "http://localhost:8000/api/v1/pose/zones/summary", "method": "GET", "expected_status": 200, "actual_status": 200, "response_time_ms": 1.21, "response_data": { "timestamp": "2025-06-07T12:28:56.773322", "total_persons": 7, "zones": { "zone_1": { "occupancy": 2, "max_occupancy": 10, "status": "active" }, "zone_2": { "occupancy": 1, "max_occupancy": 10, "status": "active" }, "zone_3": { "occupancy": 2, "max_occupancy": 10, "status": "active" }, "zone_4": { "occupancy": 2, "max_occupancy": 10, "status": "active" } }, "active_zones": 4 }, "success": true, "timestamp": "2025-06-07T12:28:56.774037" }, { "test_name": "GET /api/v1/pose/historical", "description": "Historical pose data", "url": "http://localhost:8000/api/v1/pose/historical", "method": "GET", "expected_status": 200, "actual_status": 405, "response_time_ms": 0.91, "response_data": { "error": { "code": 405, "message": "Method Not Allowed", "type": "http_error", "path": "/api/v1/pose/historical" } }, "success": false, "timestamp": "2025-06-07T12:28:56.775097" }, { "test_name": "GET /api/v1/pose/activities/recent", "description": "Recent activities", "url": "http://localhost:8000/api/v1/pose/activities/recent", "method": "GET", "expected_status": 200, "actual_status": 404, "response_time_ms": 0.78, "response_data": { "error": { "code": 404, "message": "Not Found", "type": "http_error", "path": "/api/v1/pose/activities/recent" } }, "success": false, "timestamp": "2025-06-07T12:28:56.776228" }, { "test_name": "GET /api/v1/calibration/status", "description": "Calibration status", "url": "http://localhost:8000/api/v1/calibration/status", "method": "GET", "expected_status": 200, "actual_status": 404, "response_time_ms": 0.9, "response_data": { "error": { "code": 404, "message": "Not Found", "type": "http_error", "path": "/api/v1/calibration/status" } }, "success": false, "timestamp": "2025-06-07T12:28:56.777282" }, { "test_name": "POST /api/v1/calibration/start", "description": "Start calibration", "url": "http://localhost:8000/api/v1/calibration/start", "method": "POST", "expected_status": 200, "actual_status": 404, "response_time_ms": 0.81, "response_data": { "error": { "code": 404, "message": "Not Found", "type": "http_error", "path": "/api/v1/calibration/start" } }, "success": false, "timestamp": "2025-06-07T12:28:56.778372" }, { "test_name": "GET /api/v1/statistics", "description": "System statistics", "url": "http://localhost:8000/api/v1/statistics", "method": "GET", "expected_status": 200, "actual_status": 404, "response_time_ms": 0.87, "response_data": { "error": { "code": 404, "message": "Not Found", "type": "http_error", "path": "/api/v1/statistics" } }, "success": false, "timestamp": "2025-06-07T12:28:56.779653" }, { "test_name": "GET /api/v1/hardware/status", "description": "Hardware status", "url": "http://localhost:8000/api/v1/hardware/status", "method": "GET", "expected_status": 200, "actual_status": 404, "response_time_ms": 0.9, "response_data": { "error": { "code": 404, "message": "Not Found", "type": "http_error", "path": "/api/v1/hardware/status" } }, "success": false, "timestamp": "2025-06-07T12:28:56.780706" }, { "test_name": "GET /api/v1/hardware/routers", "description": "Router information", "url": "http://localhost:8000/api/v1/hardware/routers", "method": "GET", "expected_status": 200, "actual_status": 404, "response_time_ms": 0.75, "response_data": { "error": { "code": 404, "message": "Not Found", "type": "http_error", "path": "/api/v1/hardware/routers" } }, "success": false, "timestamp": "2025-06-07T12:28:56.781763" }, { "test_name": "GET /api/v1/hardware/routers/main_router", "description": "Specific router info", "url": "http://localhost:8000/api/v1/hardware/routers/main_router", "method": "GET", "expected_status": 200, "actual_status": 404, "response_time_ms": 0.83, "response_data": { "error": { "code": 404, "message": "Not Found", "type": "http_error", "path": "/api/v1/hardware/routers/main_router" } }, "success": false, "timestamp": "2025-06-07T12:28:56.782949" }, { "test_name": "GET /api/v1/stream/status", "description": "Stream status", "url": "http://localhost:8000/api/v1/stream/status", "method": "GET", "expected_status": 200, "actual_status": 500, "response_time_ms": 1.2, "response_data": { "error": { "code": 500, "message": "Failed to get stream status: 'is_active'", "type": "http_error", "path": "/api/v1/stream/status" } }, "success": false, "timestamp": "2025-06-07T12:28:56.784463" }, { "test_name": "POST /api/v1/stream/start", "description": "Start streaming", "url": "http://localhost:8000/api/v1/stream/start", "method": "POST", "expected_status": 200, "actual_status": 401, "response_time_ms": 1.3, "response_data": { "error": { "code": 401, "message": "Authentication required", "type": "http_error", "path": "/api/v1/stream/start" } }, "success": false, "timestamp": "2025-06-07T12:28:56.785880" }, { "test_name": "POST /api/v1/stream/stop", "description": "Stop streaming", "url": "http://localhost:8000/api/v1/stream/stop", "method": "POST", "expected_status": 200, "actual_status": 401, "response_time_ms": 1.27, "response_data": { "error": { "code": 401, "message": "Authentication required", "type": "http_error", "path": "/api/v1/stream/stop" } }, "success": false, "timestamp": "2025-06-07T12:28:56.787501" }, { "test_name": "WebSocket /ws/pose", "description": "Pose data WebSocket", "url": "ws://localhost:8000/ws/pose", "method": "WebSocket", "response_time_ms": null, "response_data": null, "success": false, "error": "server rejected WebSocket connection: HTTP 403", "traceback": "Traceback (most recent call last):\n File \"/workspaces/wifi-densepose/scripts/test_api_endpoints.py\", line 164, in test_websocket_endpoint\n async with websockets.connect(ws_url) as websocket:\n File \"/usr/local/python/3.12.1/lib/python3.12/site-packages/websockets/asyncio/client.py\", line 587, in __aenter__\n return await self\n ^^^^^^^^^^\n File \"/usr/local/python/3.12.1/lib/python3.12/site-packages/websockets/asyncio/client.py\", line 543, in __await_impl__\n await self.connection.handshake(\n File \"/usr/local/python/3.12.1/lib/python3.12/site-packages/websockets/asyncio/client.py\", line 114, in handshake\n raise self.protocol.handshake_exc\n File \"/usr/local/python/3.12.1/lib/python3.12/site-packages/websockets/client.py\", line 325, in parse\n self.process_response(response)\n File \"/usr/local/python/3.12.1/lib/python3.12/site-packages/websockets/client.py\", line 142, in process_response\n raise InvalidStatus(response)\nwebsockets.exceptions.InvalidStatus: server rejected WebSocket connection: HTTP 403\n", "timestamp": "2025-06-07T12:28:56.810344" }, { "test_name": "WebSocket /ws/hardware", "description": "Hardware status WebSocket", "url": "ws://localhost:8000/ws/hardware", "method": "WebSocket", "response_time_ms": null, "response_data": null, "success": false, "error": "server rejected WebSocket connection: HTTP 403", "traceback": "Traceback (most recent call last):\n File \"/workspaces/wifi-densepose/scripts/test_api_endpoints.py\", line 164, in test_websocket_endpoint\n async with websockets.connect(ws_url) as websocket:\n File \"/usr/local/python/3.12.1/lib/python3.12/site-packages/websockets/asyncio/client.py\", line 587, in __aenter__\n return await self\n ^^^^^^^^^^\n File \"/usr/local/python/3.12.1/lib/python3.12/site-packages/websockets/asyncio/client.py\", line 543, in __await_impl__\n await self.connection.handshake(\n File \"/usr/local/python/3.12.1/lib/python3.12/site-packages/websockets/asyncio/client.py\", line 114, in handshake\n raise self.protocol.handshake_exc\n File \"/usr/local/python/3.12.1/lib/python3.12/site-packages/websockets/client.py\", line 325, in parse\n self.process_response(response)\n File \"/usr/local/python/3.12.1/lib/python3.12/site-packages/websockets/client.py\", line 142, in process_response\n raise InvalidStatus(response)\nwebsockets.exceptions.InvalidStatus: server rejected WebSocket connection: HTTP 403\n", "timestamp": "2025-06-07T12:28:56.813660" }, { "test_name": "GET /docs", "description": "API documentation", "url": "http://localhost:8000/docs", "method": "GET", "expected_status": 200, "actual_status": 200, "response_time_ms": 0.93, "response_data": { "raw_response": "\n \n \n
\n \n \n