How to Write Test Cases for Video Calls (With Examples)
How to Write Test Cases for Video Calls (With Examples)
How to Write Test Cases for Video Calls (With Examples)
Video calling has become a core feature in many applications, from enterprise collaboration tools to social platforms and telehealth services. Because a video call involves real‑time media streams, device permissions, network variability, and complex UI interactions, the test surface is large and prone to subtle defects that only appear under specific conditions. A well‑structured set of test cases gives you repeatable coverage of the happy path, error conditions, and boundary scenarios, while also providing a clear traceability link to requirements. This guide walks you through the anatomy of a video‑call test case, shows how to derive positive, negative, and edge cases, explains test data and environment setup, describes prioritization and traceability, compares manual and automated approaches, and finishes with a concrete test matrix of 20+ examples you can copy into your test management tool.
Understanding the Video Call System Under Test
Before writing test cases you need a mental model of the system. A typical video‑call implementation consists of several layers that interact in real time:
- Signaling layer – responsible for session initiation, negotiation of codecs, and exchange of metadata (often WebSocket or SIP over HTTPS).
- Media transport layer – carries encoded audio and video packets (usually UDP‑based SRTP or QUIC).
- Client‑side processing – captures camera/microphone, applies echo cancellation, noise suppression, video encoding/and optionally applies virtual backgrounds or filters.
- UI layer – presents the local preview, remote participant tiles, controls (mute, video off, screen share, chat, recording, reactions), and handles permission dialogs.
- Backend services – authentication, user‑presence, recording storage, transcoding, and sometimes TURN/STUN servers for NAT traversal.
Understanding these components helps you identify where failures can surface. For example, a black screen may be caused by a camera permission denial (UI), a codec mismatch (signaling), or packet loss (media transport).
Core Components to Model in Test Cases
| Component | What to Verify | Typical Failure Symptoms |
|---|---|---|
| Signaling | Correct SDP offer/answer, ICE gathering, token renewal | Call fails to connect, “connecting…” spinner hangs |
| Media Transport | Packet loss resilience, jitter buffer, bitrate adaptation | Choppy audio, frozen video, dropped frames |
| Client Processing | Echo cancellation, gain control, video orientation | Audio feedback, upside‑down video, excessive CPU |
| UI | State updates, accessibility labels, gesture handling | Buttons unresponsive, screen reader misses labels |
| Backend | Auth token validity, recording availability, TURN relay fallback | 401 errors, recording not saved, fallback to relay increases latency |
Typical User Flows to Cover
- Pre‑call – app launch, login, permission granting, navigating to call screen.
- Call initiation – dialing a contact or joining a meeting ID, waiting for remote answer.
- In‑call – muting/unmuting, video on/off, switching cameras, screen sharing, raising hand, chat, reactions.
- Post‑call – ending call, reviewing call quality metrics, saving or sharing recording, returning to home screen.
Each flow can be broken into atomic steps that become the basis for individual test cases.
Anatomy of a Test Case for Video Calls
A test case is more than a list of steps; it is a contract that tells the tester *what* to verify, *under which conditions*, and *what the expected outcome* is. For video calls we recommend the following sections:
- Test Case ID – a unique, immutable identifier (e.g., VC‑001).
- Title – short, descriptive phrase (e.g., “Verify call connects when both users grant camera and microphone permissions”).
- Preconditions – device state, app state, network configuration, user accounts, permissions, and any required test data.
- Test Data – usernames/passwords, meeting IDs, codec preferences, bitrate limits, simulated network profiles.
- Steps – numbered actions performed by the tester or automation script. Each step should be atomic and observable.
- Expected Result – measurable outcome (e.g., “Local and remote video streams render within 2 seconds”, “Audio level meter shows -20 dBFS when muted”).
- Postconditions – state that should be true after the test (e.g., “Call is terminated, resources released”).
- Priority / Severity – based on risk (P0‑critical, P1‑high, P2‑medium, P3‑low).
- Requirement Traceability – link to the functional or non‑functional requirement(s) the test validates (e.g., REQ‑VID‑03).
Having a consistent template makes reviews easier and enables automated test case generation from requirements.
Example Test Case Skeleton (Markdown)
**ID:** VC-001
**Title:** Verify call connects when both users grant camera and microphone permissions
**Preconditions:**
- Two Android devices (Device A, Device B) with app version 2.4.0 installed.
- Both devices are on Wi‑Fi with 20 Mbps downlink, 5 Mbps uplink, <30 ms RTT.
- Users alice@example.com and bob@example.com exist and are friends.
- No existing call sessions.
**Test Data:**
- Meeting ID: auto‑generated by app when Alice taps “New Call”.
**Steps:**
1. On Device A, launch app, log in as alice@example.com.
2. Grant camera and microphone when prompted.
3. Tap “New Call”, select Bob, and initiate call.
4. On Device B, accept incoming call prompt.
5. Grant camera and microphone when prompted.
**Expected Result:**
- Within 3 seconds, both devices display local preview and remote video.
- Audio bidirectional: speaking into mic on Device A is heard on Device B and vice‑versa.
- Call status bar shows “Connected”.
**Postconditions:**
- End call on either device; both apps return to idle screen.
- No lingering media processes in system monitor.
**Priority:** P0
**Requirement:** REQ‑VID‑01 (Basic call establishment)
You can store this skeleton in a test‑case management tool (e.g., TestRail, Zephyr) or in a markdown‑based repository for lightweight teams.
Positive Test Cases
Positive test cases verify that the system works as intended under normal conditions. They form the baseline for regression and are usually automated first.
Basic Call Establishment
| ID | Title | Preconditions | Steps | Expected Result |
|---|---|---|---|---|
| VC‑001 | Verify call connects when both users grant camera and microphone permissions | Two devices, Wi‑Fi, valid accounts, no ongoing call | 1. Login user A, grant permissions. 2. Initiate call to user B. 3. On device B, accept call and grant permissions. | Local and remote video render within 2 s; bidirectional audio audible; call status “Connected”. |
| VC‑002 | Verify call connects using only audio when video is disabled by default | Same as VC‑001, but app setting “Start with video off” enabled | 1. Login A, enable “Start with video off”. 2. Initiate call to B. 3. B accepts call. | Audio connects within 2 s; video tiles show “Video off” placeholder; no video streams transmitted. |
| VC‑003 | Verify call reconnects after temporary Wi‑Fi loss (<5 s) | Same as VC‑001, network simulation tool able to drop Wi‑Fi for 4 s | 1. Establish call (VC‑001). 2. At 10 s into call, drop Wi‑Fi on both devices for 4 s. 3. Restore Wi‑Fi. | Call recovers within 3 s of restoration; no user‑visible freeze >1 s; media resumes. |
Audio/Video Quality Controls
| ID | Title | Preconditions | Steps | Expected Result |
|---|---|---|---|---|
| VC‑004 | Verify mute/unmute toggles local audio correctly | Call in progress (VC‑001) | 1. While call active, tap mute button on device A. 2. Speak into mic. 3. Tap unmute. 4. Speak again. | When muted, remote device hears no audio (level <‑50 dBFS). When unmuted, audio is heard with normal level. |
| VC‑005 | Verify video on/off toggles local video feed correctly | Call in progress (VC‑001) | 1. Tap video off button on device A. 2. Verify local preview shows “Video off”. 3. Tap video on button. 4. Verify local preview resumes camera feed. | Video stream stops transmitting when off; remote sees frozen last frame or placeholder. When on, fresh frames resume within 1 s. |
| VC‑006 | Verify switching between front and rear cameras works | Call in progress, device has both cameras | 1. Tap camera switch button. 2. Verify preview changes to rear camera view. 3. Tap again. 4. Verify preview returns to front camera. | Camera switch completes within 1 s; video stream continues without freeze; appropriate orientation maintained. |
Screen Sharing and Collaboration Features
| ID | Title | Preconditions | Steps | Expected Result |
|---|---|---|---|---|
| VC‑007 | Verify screen sharing starts and stops correctly | Call in progress, Android 10+ (screen capture permission granted) | 1. Tap “Share Screen”. 2. Confirm system prompt. 3. Navigate to another app (e.g., Chrome). 4. Tap “Stop Sharing”. | Remote participants see device A’s screen within 2 s of start; when stopped, remote view reverts to device A’s camera feed within 1 s. No crash or permission leak. |
| VC‑008 | Verify whiteboard annotation is visible to all participants | Call in progress, whiteboard feature enabled | 1. Open whiteboard from call toolbar. 2. Draw a line. 3. Clear drawing. 4. Close whiteboard. | All remote participants see the line appear instantly; clearing removes line for all; no latency >500 ms. |
| VC‑009 | Verify in‑chat messaging persists for the call duration | Call in progress, chat feature enabled | 1. Send text message “Hello”. 2. Send emoji. 3. Wait 30 s. 4. End call. 5. Re‑join same meeting ID. | Message “Hello” and emoji appear in chat view for all participants instantly; after re‑join, chat history is cleared (or persisted per product‑per policy). |
Recording and Playback
| ID | Title | Preconditions | Steps | Expected Result |
|---|---|---|---|---|
| VC‑010 | Verify local recording starts, stops, and file is accessible | Call in progress, recording permission granted, sufficient storage | 1. Tap “Record”. 2. Speak and show video for 10 s. 3. Tap “Stop Recording”. 4. Open app’s recordings list. | Recording file appears with correct timestamp; playback shows audio and video synchronized; file size >0 KB. |
| VC‑011 | Verify cloud recording notification appears for remote participants | Call in progress, cloud recording enabled, both users have notifications allowed | 1. User A starts cloud recording. 2. Observe device B. | Device B shows a toast/icon indicating “Recording in progress”. |
| VC‑012 | Verify recording fails gracefully when storage is low | Call in progress, storage <10 MB free | 1. Attempt to start recording. 2. Observe error handling. | App shows inline error “Not enough storage to record”; recording button remains disabled until space freed; call continues unaffected. |
Negative and Error‑Handling Test Cases
Negative cases validate that the system behaves correctly when something goes wrong. They are essential for stability and for providing useful feedback to users.
Permission Denials
| ID | Title | Preconditions | Steps | Expected Result |
|---|---|---|---|---|
| VC‑013 | Verify call initiation is blocked when camera permission is denied | Fresh install, no permissions granted | 1. Launch app, log in. 2. When camera permission prompt appears, select “Deny”. 3. Attempt to start a call. | App shows inline error “Camera access required to start video call”; call button remains disabled; no media streams started. |
| VC‑014 | Verify call proceeds with audio only when microphone permission denied but camera granted | Fresh install, camera granted, mic denied | 1. Launch app, log in. 2. Grant camera, deny microphone. 3. Start call. | Call connects; local preview shows video; remote receives video but audio channel is muted (silence); UI shows mic muted icon. |
| VC‑015 | Verify handling of runtime permission revocation during call | Call in progress, both permissions granted | 1. While call active, go to Settings → Apps → [App] → Permissions → revoke camera. 2. Observe UI. | App pauses local video preview, shows “Camera disabled” overlay; remote sees frozen last frame or placeholder; call remains active audio‑only. |
Network Failure Scenarios
| ID | Title | Preconditions | Steps | Expected Result |
|---|---|---|---|---|
| VC‑016 | Verify call fails to connect when signaling server is unreachable | Devices on Wi‑Fi, but DNS for signaling host points to non‑existent IP | 1. Configure router to block signaling domain. 2. Attempt to start call. | After timeout (≈10 s), app shows “Unable to connect – check network”; call button re‑enables; no media streams allocated. |
| VC‑017 | Verify graceful degradation under high packet loss (30 %) | Call in progress, network emulator set to 30 % loss, 2 ms jitter | 1. Establish call (VC‑001). 2. Apply loss for 20 s. 3. Remove loss. | Audio may experience occasional dropouts but remains intelligible; video may freeze or show pixelation; after loss removal, bitrate adapts up and quality recovers within 5 s. |
| VC‑018 | Verify call drops after exceeding maximum retransmission attempts (simulated dead link) | Call in progress, network emulator set to 100 % loss after 5 s | 1. Establish call. 2. After 5 s, enforce total loss. 3. Wait. | After ~8 s (retry limit), app shows “Call ended due to poor connection”; both devices return to idle; resources released. |
Invalid Input and Authentication Errors
| ID | Title | Preconditions | Steps | Expected Result |
|---|---|---|---|---|
| VC‑019 | Verify call cannot be started with an invalid meeting ID | Two valid users, meeting ID format known (e.g., 9‑digit numeric) | 1. User A enters “ABCDEF” (non‑numeric) as meeting ID. 2. Tap “Join”. | App shows validation error “Meeting ID must be 9 digits”; join button stays disabled. |
| VC‑020 | Verify handling of expired authentication token | User logged in, token expiry set to 5 min in backend | 1. Log in, wait 6 min. 2. Attempt to start a call. | App automatically redirects to login screen; shows “Session expired, please log in again”; no call attempt made. |
| VC‑021 | Verify call rejects invitation from blocked user | User A has blocked user B in app settings | 1. User B attempts to call user A. 2. Observe device A. | Incoming call is silently ignored; no notification appears; call log shows missed call from blocked user (if policy). |
Boundary and Edge Cases
Edge cases push the system to its limits and often reveal defects that only appear under stress or unusual combinations of conditions.
Participant Count Limits
| ID | Title | Preconditions | Steps | Expected Result |
|---|---|---|---|---|
| VC‑022 | Verify call supports maximum participants (e.g., 16) without crashing | 16 devices, each on stable Wi‑Fi, app version supporting 16‑way | 1. Device 1 creates a meeting. 2. Devices 2‑16 join sequentially. 3. Maintain call for 2 min. | All participants receive audio and video streams (may be downscaled); UI shows grid layout; no crash or ANR observed. |
| VC‑023 | Verify behavior when exceeding participant limit (e.g., 17th join) | Same as VC‑022, limit set to 16 | 1. After 16 participants are in call, device 17 attempts to join. | Join attempt receives error “Room full”; device 17 stays in lobby; existing 16‑person call unaffected. |
Call Duration and Resource Leaks
| ID | Title | Preconditions | Steps | Expected Result |
|---|---|---|---|---|
| VC‑024 | Verify call can run for 4 hours without memory growth | Two devices, Wi‑Fi, call established (VC‑001) | 1. Start call. 2. Let run for 4 h (or simulate with fast‑clock). 3. Monitor heap usage via adb. | Memory increase <5 MB over baseline; no GC thrashing; CPU stays <30 % on average. |
| VC‑025 | Verify foreground/service call survives device orientation change | Call in progress | 1. While call active, rotate device from portrait to landscape. 2. Rotate back. | UI re‑layouts correctly; video streams continue without freeze; no activity recreation flicker. |
| VC‑026 | Verify call continues when another app requests audio focus (e.g., incoming notification sound) | Call in progress, device receives a high‑priority audio notification | 1. Play a notification sound that requests audio focus. 2. Observe call audio. | Call audio volume ducks (lowered) during notification, then restores to previous level; no audio dropout beyond ducking period. |
Low Bandwidth and High Latency
| ID | Title | Preconditions | Steps | Expected Result |
|---|---|---|---|---|
| VC‑027 | Verify call maintains audio at 30 kbps uplink (audio‑only mode) | Two devices, network limited to 30 kbps uplink, video disabled | 1. Establish call with video off. 2. Speak continuously for 30 s. 3. Measure MOS (Mean Opinion Score) via automated tool. | Audio remains intelligible (MOS ≥ 3.0); no dropped packets >2 %. |
| VC‑028 | Verify video degrades to lowest usable resolution under 150 kbps downlink | Two devices, downlink limited to 150 kbps, uplink 300 kbps | 1. Establish call with video on. 2. Observe video resolution reported by app. 3. Check for frozen frames. | Video resolution drops to 160×120 or similar; frame rate may fall to 5 fps but remains continuous; audio unaffected. |
| VC‑029 | Verify call tolerates 400 ms RTT with jitter buffer | Two devices, RTT 400 ms, jitter ±100 ms | 1. Establish call. 2. Send periodic audio bursts. 3. Measure end‑to‑end delay. | Audio delay stays within 600 ms; occasional packet loss concealed by jitter buffer; no audible glitches >10 ms. |
Concurrency and Interruption
| ID | Title | Preconditions | Steps | Expected Result |
|---|---|---|---|---|
| VC‑030 | Verify call survives incoming voice call (native telephony) | Call in progress, device receives cellular voice call | 1. While video call active, receive incoming phone call. 2. Accept native call. 3. End native call. 4. Observe video call state. | Video call is placed on hold (audio muted, video paused) during native call; after native call ends, video call resumes automatically with same state. |
| VC‑031 | Verify call does not leak wake‑lock when app goes to background | Call in progress, device screen off | 1. Start call. 2. Press power button to turn screen off. 3. Wait 2 min. 4. Check wake‑lock count via adb shell dumpsys power. | Wake‑lock count returns to baseline; no excessive battery drain; audio continues if call not muted. |
| VC‑032 | Verify call handling when Bluetooth headset connects/disconnects mid‑call | Call in progress, Bluetooth headset paired | 1. While call active, connect Bluetooth headset. 2. Verify audio routes to headset. 3. Disconnect headset. 4. Verify audio returns to built‑in speaker/mic. | Audio routing switches within 1 s; no dropouts >200 ms; UI reflects current audio route. |
Test Data Setup and Environment
Reliable test execution depends on reproducible data and a controllable environment. Below are the essential elements you should automate or script.
Device Matrix
| Device Type | OS Version | Camera Specs | Mic Specs | Reason for Inclusion |
|---|---|---|---|---|
| Google Pixel 8 | Android 14 | 12 MP main, 1080p@30fps | Dual‑mic array | Baseline flagship |
| Samsung Galaxy A52 | Android 13 | 16 MP, 1080p@30fps | Single mic | Mid‑range, common |
| Xiaomi Redmi Note 12 | Android 12 | 48 MP, 1080p@30fps | Single mic | Budget segment |
| iPhone 15 | iOS 17 | 48 MP main, 4K@60fps | Triple‑mic array | iOS reference |
| iPad Air (5th) | iOS 17 | 12 MP ultra wide, 1080p@60fps | Dual‑mic | Tablet form factor |
Automate provisioning with a script that installs the app under test, grants necessary permissions via ADB (adb shell pm grant ...) or Xcode (xcrun simctl privacy), and logs device identifiers.
Network Simulation Tools
- Linux tc (traffic control) – shape bandwidth, add latency, jitter, packet loss.
- Clumsy (Windows) – easy GUI for introducing loss, delay, duplicate, reorder.
- Network Link Conditioner (macOS/iOS) – preset profiles (3G, LTE, Poor Network).
- Facebook’s Augmented Traffic Control (ATC) – containerized, reproducible CI pipelines.
Example tc command to simulate 30 kbps uplink, 150 kbps downlink, 100 ms latency, 10 % loss:
# Assuming interface eth0
tc qdisc add dev eth0 root handle 1: htb default 11
tc class add dev eth0 parent 1: classid 1:1 htb rate 1mbit
tc class add dev eth0 parent 1:1 classid 1:10 htb rate 30kbps ceil 30kbps
tc class add dev eth0 parent 1:1 classid 1:11 htb rate 150kbps ceil 150kbps
tc qdisc add dev eth0 parent 1:10 handle 10: netem loss 10% delay 100ms 20ms distribution normal
tc qdisc add dev eth0 parent 1:11 handle 11: netem loss 10% delay 100ms 20ms distribution normal
Mock Servers and Service Virtualization
For signaling and media relay, you can run a lightweight WebSocket server (e.g., using Node.js + ws) that echoes SDP messages, or use open‑source SFU like mediasoup or Janus configured to allow deterministic bitrate control. This lets you inject specific SDP attributes (e.g., force VP8, set max bitrate to 150 kbps) without relying on a production backend.
Credential and Test Data Management
- Store usernames/passwords in a vault (HashiCorp Vault, AWS Secrets Manager) and inject at runtime via environment variables.
- Use data‑driven test frameworks (TestNG, JUnit Parameterized, pytest
@pytest.mark.parametrize) to iterate over meeting IDs, codec preferences, and network profiles. - Generate unique meeting IDs via a UUID or timestamp to avoid collisions in parallel runs.
Prioritization and Traceability
Not all test cases carry equal weight. Use a risk‑based matrix to decide which to automate first, which to keep as exploratory manual checks, and which to de‑prioritize.
Risk‑Based Prioritization Table
| Priority | Criteria | Example Test Cases |
|---|---|---|
| P0 (Critical) | Failure blocks core functionality or causes data loss / security breach | VC‑001 (call connect), VC‑013 (camera denial), VC‑016 (signaling unreachable), VC‑024 (4‑hour stability) |
| P1 (High) | Degrades user experience significantly but does not block core flow | VC‑004 (mute/unmute), VC‑007 (screen share), VC‑010 (recording), VC‑027 (audio‑only low bandwidth) |
| P2 (Medium) | Affects edge scenarios or secondary features | VC‑022 (max participants), VC‑018 (dead link drop), VC‑030 (incoming native call) |
| P3 (Low) | Cosmetic, rare, or covered by exploratory testing | VC‑005 (video on/off UI animation), VC‑012 (low storage recording error), VC‑031 (wake‑lock) |
Map each test case to a requirement ID from your specification document. For instance:
| Test Case ID | Requirement ID | Requirement Description |
|---|---|---|
| VC‑001 | REQ‑VID‑01 | The system shall establish a bidirectional audio/video call within 3 seconds when both parties grant required permissions. |
| VC‑004 | REQ‑VID‑05 | Users shall be able to mute and unmute their local microphone without affecting the remote stream. |
| VC‑010 | REQ‑VID‑09 | The system shall provide an option to record the call locally, storing an encrypted file accessible after the call ends. |
| VC‑022 | REQ‑VID‑13 | The system shall support up to N simultaneous participants (where N = 16 for the current tier) with acceptable audio/video quality. |
Maintaining this traceability matrix in a spreadsheet or linked in your test‑management tool enables impact analysis when requirements change.
Manual vs Automated Approaches
Both manual exploratory testing and automated scripted tests have a place in a video‑call testing strategy. Knowing when to use each improves efficiency and coverage.
When to Automate
- Regression safety net – core flows (call connect, mute/unmute, screen share) that must pass every build.
- Performance and load – simulating many participants or long duration calls where manual repetition is infeasible.
- Environmental variability – running the same test across dozens of network profiles or device configurations automatically.
When to Keep Manual
- Exploratory UX – assessing how the UI feels under unusual gestures, checking accessibility with screen readers, or noticing subtle visual glitches.
- Ad‑hoc fault injection – trying uncommon permission revocation sequences or hardware interruptions that are hard to script reliably.
- User‑perception metrics – gathering MOS scores or subjective quality feedback that require human judgment.
Automation Scripting Tips
- Use explicit waits for media readiness – instead of fixed
sleep, wait for a video element’sreadyState >= 2or for an audio level meter to cross a threshold. - Decouple signaling from media – mock the signaling layer to control SDP exchange, then let the real media stack handle transport; this makes tests faster and less flaky.
- Leverage device‑specific APIs – on Android, use
MediaProjectionfor screen‑capture verification; on iOS, useAVFoundationto capture sample buffers and compute frame‑rate. - Log media metrics – most SDKs expose callbacks for bitrate, packet loss, jitter, and RTT; push these to a test report for trend analysis.
- Clean up after each test – ensure calls are terminated, media resources released, and any temporary files deleted to avoid cross‑test contamination.
Example: Automated Call Connect Test with Appium (Android)
@Test
public void testCallConnectsWhenPermissionsGranted() throws Exception {
// 1. Launch app and login
AndroidDriver driver = new AndroidDriver(new URL("http://localhost:4723/wd/hub"), caps);
LoginPage login = new LoginPage(driver);
login.login("alice@example.com", "password");
// 2. Grant permissions via ADB (done in @Before)
// 3. Initiate call
HomePage home = new HomePage(driver);
home.startCall("bob@example.com");
// 4. Accept on second device (simulated via another driver or API)
AndroidDriver driver2 = ...; // second device session
CallPage callB = new CallPage(driver2);
callB.acceptIncomingCall();
// 5. Wait for local and remote video elements to report playing
WebDriverWait wait = new WebDriverWait(driver, Duration.ofSeconds(10));
wait.until(ExpectedConditions.attributeContains(
home.localVideoElement(), "readyState", "2"));
wait.until(ExpectedConditions.attributeContains(
home.remoteVideoElement(), "readyState", "2"));
// 6. Verify audio level > threshold (pseudo‑code)
Assert.assertTrue(home.getMicLevel() > -3
Test Your App Autonomously
Upload your APK or URL. SUSA explores like 10 real users — finds bugs, accessibility violations, and security issues. No scripts.
Try SUSA Free