Search GimmeJob

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

How would you test a WebSocket-based real-time feature such as chat or live notifications?

Answer

Test connection establishment and authentication separately from message behavior. Verify both directions, message schema and authorization, multiple clients, subscribe/unsubscribe state, graceful close, heartbeat or timeout behavior, disconnect/reconnect and resubscription. Inject duplicates, delayed and reordered messages and rapid bursts, then verify the product's documented ordering, deduplication and recovery rules rather than assuming TCP alone solves application-level state.

Strong answer includes

  • separates handshake and authorization from message-level assertions
  • covers disconnect, reconnect, resubscription and multiple concurrent clients
  • tests duplicate, delayed, reordered and burst traffic against explicit product semantics

Practical example

Two browser sessions join the same support chat. QA verifies both receive message A, kills one connection before message B, reconnects it, and checks whether the product correctly restores the subscription without duplicating A or losing B; an unauthorized third session must still be unable to subscribe to that conversation.

#websocket#real-time#messaging#api-qa

Sources

400+ питань на співбесіду QA для всіх рівнівDOU · Ukrainian-market recurrence signal across QA theory, web, mobile, Git, Selenium, Scrum and practical interview scenarios200+ QA Interview Questions & Answers (2026)AssertHired · Current QA/SDET recurrence signal across practical scenarios, automation, API, CI/CD, real-time systems and tool selectionWebSocket APIMozilla · Bidirectional WebSocket communication, connection behavior and real-time browser API semantics