Search GimmeJob

Type at least 2 characters. Enter also searches by meaning.
QA interview question
Web, API & dataMiddleOccasionalScenario

What should be tested when a WebSocket connection is interrupted?

Answer

Check handshake and authorization, heartbeat and timeout behaviour, reconnect backoff, resubscription, duplicate or missing messages, ordering, offline UI state and recovery after server restart. Confirm that reconnects do not bypass access controls.

Strong answer includes

  • connection lifecycle
  • message integrity
  • authorization after reconnect

Practical example

During a chat app test, the tester kills the WebSocket connection mid-session with a proxy tool, confirms the client shows an 'offline' banner and buffers outgoing messages, then restores the network and verifies the client resubscribes to the same channels and that no message got duplicated or lost in the process.

#websocket#reconnect#realtime

Sources

MDN HTTP referenceMozilla · HTTP methods, messages, status codes, headers, cookies and cachingOWASP Web Security Testing GuideOWASP · Web application security test coverage