PRACTICAL GUIDE / test cases for chat application

Test Cases for Chat Application: Messaging QA Guide

Test cases for chat application QA covering sending, delivery, read receipts, typing, offline sync, attachments, moderation, and scale risks.

By The Testing AcademyUpdated July 10, 20268 min read
All field guides
In this guide9 sections
  1. Map the Message Lifecycle
  2. Build Identities, Devices, and Conversation States
  3. Verify Sending, Ordering, and Deduplication
  4. Break the Connection at Each Boundary
  5. Test Groups, Membership, and Receipts
  6. Exercise Attachments and Rich Content
  7. Enforce Privacy, Blocking, and Moderation
  8. Check Accessibility and Human Interaction
  9. Measure Behavior Under Volume

What you will learn

  • Map the Message Lifecycle
  • Build Identities, Devices, and Conversation States
  • Verify Sending, Ordering, and Deduplication
  • Break the Connection at Each Boundary

The hardest chat defect is not a message that visibly fails. It is a message that appears sent on one device, arrives twice on another, and reorders after both users reconnect. Real-time messaging combines local optimistic state, a persistent server record, push delivery, multiple devices, and permissions that can change while a conversation is open.

The test model must follow a message from composition to durable history. It should also define what happens when any step is delayed, repeated, or denied. A polished chat screen is not trustworthy until those state transitions are proven.

Map the Message Lifecycle

Agree on the product's message states before writing cases. Common states include composing, queued locally, accepted by the server, delivered to a recipient device, read, edited, and deleted. The interface may collapse these into a few icons, but the expected behavior for each transition still needs to be explicit.

EventSender should seeRecipient should seeDurable result
Local sendPending item with stable client IDNothing yetNo duplicate record
Server acceptSent state and server timestampNew message or notificationOne stored message
Device deliveryDelivered marker if supportedMessage in correct threadDelivery receipt recorded
ReadRead marker under policyRead state locallyReceipt synchronized
Edit or deleteUpdated content or tombstoneMatching changeAuditable final state

Test the state transitions independently. If the client jumps directly from pending to read in a fast environment, use controlled delays so intermediate behavior is still observable.

Also define which timestamps control display order, unread boundaries, and retention. Client-created time is useful for immediate feedback but cannot safely settle conflicts between devices with different clocks. When the server adjusts an optimistic timestamp, verify the message moves without losing reply context, reactions, or scroll position. A restored backup or imported history should follow the same ordering rules as live traffic.

Build Identities, Devices, and Conversation States

Use at least two users and two devices, then add a third identity for authorization checks. Prepare a direct conversation, a group where the user is a member, a group the user has left, a blocked relationship, and an archived or deleted thread. Keep device clocks deliberately different to prove ordering relies on server rules rather than display clocks.

Create messages with plain text, emoji, mixed scripts, right-to-left text, line breaks, links, mentions, and content at the maximum supported length. Include a conversation with enough history to paginate. Use deterministic IDs and resettable accounts so retries do not inherit unread counts or stale notification tokens.

Capture the app version, device, network state, user IDs, conversation ID, and message IDs with defects. A screenshot alone rarely explains a synchronization failure.

Verify Sending, Ordering, and Deduplication

Start with a single text message, then send several messages quickly from each participant. Every accepted message should appear once, in the same logical order on all active devices. Confirm timestamps, sender identity, formatting, unread count, conversation preview, and last-message ordering in the inbox.

Send the same client message identifier twice to simulate a retry after a lost acknowledgement. The server should return or reference the original message rather than create another. Tap send repeatedly while the interface is slow and verify the control either disables or deduplicates safely.

Useful race cases include simultaneous replies, an edit while the recipient opens the thread, and deletion while a push notification is in transit. Define the conflict policy. “Last write wins” is only testable when the source of ordering is known and the final state converges on every device.

Break the Connection at Each Boundary

Disconnect before send, after local queuing, after server acceptance, and while history is loading. Each boundary has a different expected outcome. A locally queued message should retain its content and retry safely. A server-accepted message should not be posted again merely because the acknowledgement was lost.

Switch from Wi-Fi to mobile data, move through a captive portal, restore the app after background suspension, and reconnect after the authentication token expires. Confirm visible status does not claim delivery prematurely. Failed messages need an understandable retry or discard action, and a retry must preserve the original identity used for deduplication.

After reconnecting, compare all surfaces: open conversation, inbox preview, unread badge, search index, and notification center. Synchronization is incomplete if only the current thread recovers.

Test Groups, Membership, and Receipts

Group behavior changes while clients remain connected. Add and remove members, promote and demote administrators, rename the group, and change permissions during an active session. A removed member must stop receiving new content and should lose send capability immediately according to the retention policy. Joining later must not expose history beyond what the product promises.

Check mentions for existing, removed, blocked, and similarly named users. Verify membership events are ordered with messages so a user cannot send into a group after removal due to a stale local view.

For delivery and read receipts, test privacy settings, multiple recipient devices, read from notification, mark unread, and a group with partial readership. The sender's summary must not reveal information the recipient has chosen to hide. Read counts and avatars should converge after reconnect without oscillating.

Exercise Attachments and Rich Content

Cover each supported file type at a small, typical, maximum, and just-over-maximum size. Validate MIME type from content rather than trusting the filename. Test renamed executables, corrupted media, zero-byte files, duplicate uploads, interrupted uploads, and files removed from local storage midway through selection.

Attachment riskExpected result
Upload completes, send failsReuse or safely clean the uploaded object
Send succeeds, thumbnail failsMessage remains accessible with fallback
Malware scan rejects fileNo recipient access and clear sender status
Signed URL expiresAuthorized client can refresh access
User loses conversation accessOld attachment URL no longer grants access

Verify image orientation, video duration, download progress, captions, link previews, and accessibility labels. Rich content should degrade safely when preview generation or an external metadata service is unavailable.

Enforce Privacy, Blocking, and Moderation

Attempt to fetch messages and attachments by changing conversation or message IDs. A user outside the thread must not infer content, membership, or private metadata. Search, export, forwarding, notifications, and cached previews need the same authorization rules as the primary message view.

Block and unblock users while both are online. Define whether existing history remains visible, whether new messages are rejected or hidden, and how group conversations behave. Reports should retain the evidence moderators need without keeping content longer than the published policy.

Test dangerous links, script-like text, control characters, and oversized payloads as display content. Messages must render as content, not executable markup. Logs and analytics should avoid message bodies unless explicitly required and protected. Notification previews must respect lock-screen and user privacy settings.

Check Accessibility and Human Interaction

Navigate the conversation, composer, attachment picker, reactions, and message actions with a keyboard and screen reader. Focus should move predictably when new messages arrive, a modal closes, or older history is inserted. Live announcements should identify an incoming message without reading an entire busy group continuously.

Test zoom, large text, high contrast, right-to-left layout, long names, and reduced motion. Delivery icons need accessible names that do not rely on color or shape alone. The composer should preserve a draft when focus moves or the app backgrounds.

Explore copy and paste, selection, reply context, accidental back navigation, and rapid reaction changes. These interactions often reveal stale local state that scripted happy paths miss.

Measure Behavior Under Volume

Populate a thread with long history, large groups, bursts of messages, and many unread conversations. Measure time to open, send acknowledgement, scroll older history, search, and recover after reconnect. Watch memory and battery on mobile clients as well as server latency.

Do not validate scale with one user sending in a loop. Include concurrent senders, reconnecting devices, attachment processing, push fan-out, and slow consumers. Confirm rate limits protect the service without silently dropping legitimate messages. Backpressure should lead to an honest queued or failed state.

Test notification collapse during a burst and after the conversation is muted. Opening one notification should route to the intended message without marking unrelated conversations read. Logging out, changing account, or revoking a device token must stop private previews from reaching the previous session.

Run a convergence drill before shipping: use one direct conversation across two devices, change an active group membership, retry offline at the acknowledgement boundary, reject an attachment, probe authorization, and open a long history. Preserve server message IDs and client correlation IDs in the evidence. The drill passes only when every permitted device settles on one durable conversation state.

// FIELD DISPATCH

Get the QA Field Notes

Weekly QA battles, AI testing guides, and interview drills. Free on Substack.

The Testing Academy editorial desk

Practical QA guidance built around test evidence, production tradeoffs, and interview-ready explanations.

Published July 10, 2026 / Reviewed July 10, 2026

PRIMARY REFERENCES

Verify the details at the source

QABattle guides are practical explanations. Product behavior, standards, and APIs can change, so use these primary references for the canonical details.

  1. 01
    ISTQB glossary

    ISTQB

    Shared testing terminology for test design, defects, levels, and lifecycle concepts.

FAQ / QUICK ANSWERS

Questions testers ask

What should happen when a chat message is accepted but its acknowledgement is lost?

The sender may retain a pending or reconnecting state, but retry must reuse the stable client message identifier. The server should return or reference the original durable message rather than create another. Verify one stored record, one recipient delivery, preserved reply context, and convergence of sender status after the connection returns.

Which clock should determine message order across devices?

Use the product's authoritative server ordering rule, not device display clocks. Test devices with deliberately different times and confirm optimistic messages move to their final position without losing reactions, replies, unread boundaries, or scroll location. Imported and restored history should follow the same ordering contract as live traffic.

How quickly must group removal affect an online member?

According to the retention policy, a removed member must immediately lose permission to send and stop receiving new content even if the client has a stale local membership view. Race the removal with a message, verify event ordering, then probe message, attachment, search, export, and notification access through direct identifiers.

What is the expected result when an attachment URL expires?

An authorized participant should be able to refresh access through the application, while a user who left the conversation or changed accounts must remain denied. Also test interrupted upload, send failure after upload, thumbnail failure, malware rejection, and logout. Storage cleanup must not expose or prematurely delete an attachment still referenced by a permitted message.

How do you prove a chat client has fully recovered after reconnecting?

Compare the open thread, durable message history, inbox preview, unread badge, search index, receipts, and notification state across every permitted device. Recovery is incomplete if only the visible conversation looks correct. Preserve server message IDs and client correlation IDs, and require all devices to settle on one ordered, deduplicated conversation state.