{ "total_tests": 26, "passed": 16, "failed": 10, "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": 1015.55, "response_data": { "status": "unhealthy", "timestamp": "2025-06-09T16:16:16.142631", "uptime_seconds": 0.0, "components": { "hardware": { "name": "Hardware Service", "status": "healthy", "message": "Hardware service is running normally", "last_check": "2025-06-09T16:16:16.142631", "uptime_seconds": null, "metrics": { "total_samples": 0, "success_rate": 0.0, "average_sample_rate": 0.0 } }, "pose": { "name": "Pose Service", "status": "unhealthy", "message": "'CSIProcessor' object has no attribute 'add_data'", "last_check": "2025-06-09T16:16:16.142631", "uptime_seconds": 0.0, "metrics": { "total_processed": 0, "success_rate": 0.0, "average_processing_time_ms": 0.0 } }, "stream": { "name": "Stream Service", "status": "unhealthy", "message": "Stream service is running normally", "last_check": "2025-06-09T16:16:16.142631", "uptime_seconds": null, "metrics": { "messages_sent": 0, "messages_failed": 0, "data_points_streamed": 0 } } }, "system_metrics": { "cpu": { "percent": 24.1, "count": 2 }, "memory": { "total_gb": 7.75, "available_gb": 3.73, "used_gb": 3.66, "percent": 51.9 }, "disk": { "total_gb": 31.33, "free_gb": 7.09, "used_gb": 22.62, "percent": 72.2 }, "network": { "bytes_sent": 143377795, "bytes_recv": 38382498937, "packets_sent": 663853, "packets_recv": 27676628 } } }, "success": true, "timestamp": "2025-06-09T16:16:17.147377" }, { "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": 1.62, "response_data": { "ready": true, "timestamp": "2025-06-09T16:16:17.148304", "checks": { "pose_ready": true, "stream_ready": false, "hardware_ready": true, "memory_available": true, "disk_space_available": true }, "message": "System is ready" }, "success": true, "timestamp": "2025-06-09T16:16:17.149192" }, { "test_name": "GET /api/v1/pose/current", "description": "Current pose estimation", "url": "http://localhost:8000/api/v1/pose/current", "method": "GET", "expected_status": 200, "actual_status": 500, "response_time_ms": 2.62, "response_data": { "error": { "code": 500, "message": "Pose estimation failed: 'CSIProcessor' object has no attribute 'add_data'", "type": "http_error" } }, "success": false, "timestamp": "2025-06-09T16:16:17.152124" }, { "test_name": "GET /api/v1/pose/current", "description": "Current pose estimation with parameters", "url": "http://localhost:8000/api/v1/pose/current", "method": "GET", "expected_status": 200, "actual_status": 500, "response_time_ms": 2.89, "response_data": { "error": { "code": 500, "message": "Pose estimation failed: 'CSIProcessor' object has no attribute 'add_data'", "type": "http_error" } }, "success": false, "timestamp": "2025-06-09T16:16:17.155248" }, { "test_name": "POST /api/v1/pose/analyze", "description": "Pose analysis (requires auth)", "url": "http://localhost:8000/api/v1/pose/analyze", "method": "POST", "expected_status": 200, "actual_status": 401, "response_time_ms": 1.19, "response_data": { "error": { "code": 401, "message": "Authentication required", "type": "http_error" } }, "success": false, "timestamp": "2025-06-09T16:16:17.156684" }, { "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.16, "response_data": { "zone_id": "zone_1", "current_occupancy": 2, "max_occupancy": 10, "persons": [ { "person_id": "person_0", "confidence": 0.7584342935325028, "activity": "sitting" }, { "person_id": "person_1", "confidence": 0.7957360726614804, "activity": "sitting" } ], "timestamp": "2025-06-09T16:16:17.157378" }, "success": true, "timestamp": "2025-06-09T16:16:17.158068" }, { "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.18, "response_data": { "timestamp": "2025-06-09T16:16:17.158741", "total_persons": 10, "zones": { "zone_1": { "occupancy": 3, "max_occupancy": 10, "status": "active" }, "zone_2": { "occupancy": 3, "max_occupancy": 10, "status": "active" }, "zone_3": { "occupancy": 3, "max_occupancy": 10, "status": "active" }, "zone_4": { "occupancy": 1, "max_occupancy": 10, "status": "active" } }, "active_zones": 4 }, "success": true, "timestamp": "2025-06-09T16:16:17.159457" }, { "test_name": "POST /api/v1/pose/historical", "description": "Historical pose data (requires auth)", "url": "http://localhost:8000/api/v1/pose/historical", "method": "POST", "expected_status": 200, "actual_status": 401, "response_time_ms": 1.35, "response_data": { "error": { "code": 401, "message": "Authentication required", "type": "http_error" } }, "success": false, "timestamp": "2025-06-09T16:16:17.161052" }, { "test_name": "GET /api/v1/pose/activities", "description": "Recent activities", "url": "http://localhost:8000/api/v1/pose/activities", "method": "GET", "expected_status": 200, "actual_status": 200, "response_time_ms": 1.44, "response_data": { "activities": [ { "activity_id": "activity_0", "person_id": "person_4", "zone_id": "zone_2", "activity": "lying", "confidence": 0.6336590190516906, "timestamp": "2025-06-09T15:21:17.161746", "duration_seconds": 129 }, { "activity_id": "activity_1", "person_id": "person_3", "zone_id": "zone_1", "activity": "lying", "confidence": 0.6029385903783592, "timestamp": "2025-06-09T15:26:17.161761", "duration_seconds": 84 }, { "activity_id": "activity_2", "person_id": "person_2", "zone_id": "zone_2", "activity": "walking", "confidence": 0.7168105141951289, "timestamp": "2025-06-09T15:21:17.161768", "duration_seconds": 249 }, { "activity_id": "activity_3", "person_id": "person_1", "zone_id": "zone_2", "activity": "walking", "confidence": 0.9337777519713185, "timestamp": "2025-06-09T16:14:17.161773", "duration_seconds": 25 }, { "activity_id": "activity_4", "person_id": "person_1", "zone_id": "zone_2", "activity": "walking", "confidence": 0.9251722190869065, "timestamp": "2025-06-09T15:46:17.161778", "duration_seconds": 124 }, { "activity_id": "activity_5", "person_id": "person_1", "zone_id": "zone_3", "activity": "lying", "confidence": 0.8560650661219151, "timestamp": "2025-06-09T15:25:17.161783", "duration_seconds": 284 }, { "activity_id": "activity_6", "person_id": "person_2", "zone_id": "zone_2", "activity": "standing", "confidence": 0.7596171042224766, "timestamp": "2025-06-09T16:10:17.161788", "duration_seconds": 44 }, { "activity_id": "activity_7", "person_id": "person_2", "zone_id": "zone_2", "activity": "standing", "confidence": 0.7226009769467232, "timestamp": "2025-06-09T16:14:17.161793", "duration_seconds": 285 }, { "activity_id": "activity_8", "person_id": "person_5", "zone_id": "zone_2", "activity": "sitting", "confidence": 0.6985310418183253, "timestamp": "2025-06-09T15:49:17.161797", "duration_seconds": 84 }, { "activity_id": "activity_9", "person_id": "person_2", "zone_id": "zone_3", "activity": "standing", "confidence": 0.8580793815534528, "timestamp": "2025-06-09T15:44:17.161801", "duration_seconds": 98 } ], "total_count": 10, "zone_id": null }, "success": true, "timestamp": "2025-06-09T16:16:17.162643" }, { "test_name": "GET /api/v1/pose/activities", "description": "Activities for specific zone", "url": "http://localhost:8000/api/v1/pose/activities", "method": "GET", "expected_status": 200, "actual_status": 200, "response_time_ms": 1.28, "response_data": { "activities": [ { "activity_id": "activity_0", "person_id": "person_2", "zone_id": "zone_1", "activity": "lying", "confidence": 0.7118055279642875, "timestamp": "2025-06-09T15:31:17.163344", "duration_seconds": 30 }, { "activity_id": "activity_1", "person_id": "person_1", "zone_id": "zone_1", "activity": "sitting", "confidence": 0.7835386896513759, "timestamp": "2025-06-09T15:19:17.163356", "duration_seconds": 122 }, { "activity_id": "activity_2", "person_id": "person_4", "zone_id": "zone_1", "activity": "standing", "confidence": 0.8752545024221304, "timestamp": "2025-06-09T15:51:17.163362", "duration_seconds": 32 }, { "activity_id": "activity_3", "person_id": "person_5", "zone_id": "zone_1", "activity": "sitting", "confidence": 0.6364744817199162, "timestamp": "2025-06-09T16:12:17.163366", "duration_seconds": 122 }, { "activity_id": "activity_4", "person_id": "person_2", "zone_id": "zone_1", "activity": "standing", "confidence": 0.8257296122347741, "timestamp": "2025-06-09T16:09:17.163370", "duration_seconds": 129 } ], "total_count": 5, "zone_id": "zone_1" }, "success": true, "timestamp": "2025-06-09T16:16:17.164140" }, { "test_name": "GET /api/v1/pose/calibration/status", "description": "Calibration status (requires auth)", "url": "http://localhost:8000/api/v1/pose/calibration/status", "method": "GET", "expected_status": 200, "actual_status": 401, "response_time_ms": 1.05, "response_data": { "error": { "code": 401, "message": "Authentication required", "type": "http_error" } }, "success": false, "timestamp": "2025-06-09T16:16:17.165527" }, { "test_name": "POST /api/v1/pose/calibrate", "description": "Start calibration (requires auth)", "url": "http://localhost:8000/api/v1/pose/calibrate", "method": "POST", "expected_status": 200, "actual_status": 401, "response_time_ms": 1.34, "response_data": { "error": { "code": 401, "message": "Authentication required", "type": "http_error" } }, "success": false, "timestamp": "2025-06-09T16:16:17.167060" }, { "test_name": "GET /api/v1/pose/stats", "description": "Pose statistics", "url": "http://localhost:8000/api/v1/pose/stats", "method": "GET", "expected_status": 200, "actual_status": 200, "response_time_ms": 1.18, "response_data": { "period": { "start_time": "2025-06-08T16:16:17.167752", "end_time": "2025-06-09T16:16:17.167752", "hours": 24 }, "statistics": { "total_detections": 979, "successful_detections": 913, "failed_detections": 66, "success_rate": 0.9325842696629213, "average_confidence": 0.7772789300655756, "average_processing_time_ms": 149.14050033217376, "unique_persons": 5, "most_active_zone": "zone_2", "activity_distribution": { "standing": 0.30271874071971744, "sitting": 0.27837649768917816, "walking": 0.18708896470110703, "lying": 0.001728082702075573 } } }, "success": true, "timestamp": "2025-06-09T16:16:17.168500" }, { "test_name": "GET /api/v1/pose/stats", "description": "Pose statistics (12 hours)", "url": "http://localhost:8000/api/v1/pose/stats", "method": "GET", "expected_status": 200, "actual_status": 200, "response_time_ms": 1.15, "response_data": { "period": { "start_time": "2025-06-09T04:16:17.169125", "end_time": "2025-06-09T16:16:17.169125", "hours": 12 }, "statistics": { "total_detections": 575, "successful_detections": 545, "failed_detections": 30, "success_rate": 0.9478260869565217, "average_confidence": 0.8034188084723757, "average_processing_time_ms": 190.36357958760667, "unique_persons": 11, "most_active_zone": "zone_3", "activity_distribution": { "standing": 0.32754106003431654, "sitting": 0.2966199154026318, "walking": 0.19064436177921362, "lying": 0.07117688561759788 } } }, "success": true, "timestamp": "2025-06-09T16:16:17.169845" }, { "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": 200, "response_time_ms": 1.05, "response_data": { "is_active": false, "connected_clients": 0, "streams": [ { "type": "pose_stream", "active": false, "buffer_size": 0 } ], "uptime_seconds": 0.0 }, "success": true, "timestamp": "2025-06-09T16:16:17.171125" }, { "test_name": "POST /api/v1/stream/start", "description": "Start streaming (requires auth)", "url": "http://localhost:8000/api/v1/stream/start", "method": "POST", "expected_status": 200, "actual_status": 401, "response_time_ms": 1.18, "response_data": { "error": { "code": 401, "message": "Authentication required", "type": "http_error" } }, "success": false, "timestamp": "2025-06-09T16:16:17.172494" }, { "test_name": "POST /api/v1/stream/stop", "description": "Stop streaming (requires auth)", "url": "http://localhost:8000/api/v1/stream/stop", "method": "POST", "expected_status": 200, "actual_status": 401, "response_time_ms": 1.05, "response_data": { "error": { "code": 401, "message": "Authentication required", "type": "http_error" } }, "success": false, "timestamp": "2025-06-09T16:16:17.173769" }, { "test_name": "WebSocket /ws/pose", "description": "Pose 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-09T16:16:17.199188" }, { "test_name": "WebSocket /ws/hardware", "description": "Hardware 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-09T16:16:17.203836" }, { "test_name": "GET /docs", "description": "API documentation", "url": "http://localhost:8000/docs", "method": "GET", "expected_status": 200, "actual_status": 200, "response_time_ms": 1.57, "response_data": { "raw_response": "\n \n \n
\n \n \n