# WebSocket Chat - QA Plan ## Test Cases ### TC-1: WebSocket Connection Upgrade - Connect to `GET /api/chat-api/ws` - Verify HTTP 101 Switching Protocols - Verify WebSocket connection is established ### TC-2: Message Send and Broadcast - Connect two clients to the same room - Client A sends a chat message - Verify Client B receives the message via broadcast ### TC-3: Redis Pub/Sub Integration - Connect a client - Send a message - Verify message is published to Redis channel - Verify subscriber broadcasts to all clients ### TC-4: Room-Based Messaging - Connect Client A to room "general" - Connect Client B to room "general" - Connect Client C to room "other" - Client A sends message to "general" - Verify Client B receives it - Verify Client C does not receive it ### TC-5: Graceful Shutdown - Connect a client - Send SIGTERM to server - Verify connection is closed cleanly