Screen Sharing Testing Best Practices (2026)
Screen Sharing Testing Best Practices (2026) start with a clear definition of what you intend to verify when users share their screen. This guide walks you through the principles, a concrete test matr
Screen Sharing Testing Best Practices (2026) start with a clear definition of what you intend to verify when users share their screen. This guide walks you through the principles, a concrete test matrix, decisions about automation versus manual effort, tooling choices, CI/CD integration, metrics, common production failures, anti‑patterns, and how autonomous persona‑driven exploration can strengthen your validation. Each section includes concrete examples, command snippets, and tables you can copy into your own repository.
Core Principles of Screen Sharing Testing (2026)
Screen sharing introduces a set of concerns that differ from ordinary UI testing. The shared view is a dynamic video stream that may be encoded, compressed, or rendered by a third‑party component. Your tests must therefore address both the functional correctness of the sharing flow and the perceptual quality of what remote participants see.
Principle 1: Treat the Shared Stream as a First‑Class Citizen
The video that leaves the sender’s device is not just a by‑product of a button click; it is the primary artifact that determines user experience. Validate that the stream starts, stops, and pauses on cue, that it respects the selected region (window, full screen, or application), and that it does not leak unrelated content such as notifications or system menus.
Principle 2: Account for Heterogeneous Client Capabilities
Remote viewers may use browsers with different WebRTC support, native apps with varying codec libraries, or low‑bandwidth connections. Your test matrix must include permutations of sender‑side capture settings (resolution, frame rate, bitrate) and receiver‑side playback capabilities.
Principle 3: Observe Real‑World Interaction Patterns
Screen sharing is rarely a solitary action; it occurs amid chat, file transfer, or whiteboarding. Tests should exercise the sharing flow while other concurrent features are active to surface actions are happening, ensuring that resource contention does not cause freezes or crashes.
Principle 4: Emphasize Accessibility and Security
Shared content can expose sensitive data. Verify that UI elements marked as hidden or protected are not inadvertently visible in the stream. Also confirm that screen‑reader announcements remain synchronized with the visual changes that remote participants perceive.
Principle 5: Design for Observability
Instrument both the sender and receiver sides with metrics that can be correlated: capture latency, encode delay, packet loss, jitter, and render latency on the remote side. When a test fails, these metrics help pinpoint whether the issue originates in capture, transport, or render.
Building a Prioritized Test Matrix for Screen Sharing
A test matrix lets you allocate effort where it yields the highest risk reduction. Below is a sample matrix that you can adapt to your product. Each row represents a test scenario; columns indicate priority (P0‑P2), recommended execution mode (Automated / Manual), and the primary risk mitigated.
| ID | Scenario | Priority | Mode | Risk Mitigated |
|---|---|---|---|---|
| S1 | Start sharing full screen, verify remote sees exact pixel match (no scaling) | P0 | Automated | Capture correctness, resolution fidelity |
| S2 | Start sharing a specific application window, ensure other windows are obscured | P0 | Automated | Window isolation, leakage prevention |
| S3 | Share screen while receiving a high‑priority chat notification | P1 | Manual (exploratory) | Notification overlay interference |
| S4 | Pause sharing, resume after 30 s, confirm no stale frames | P1 | Automated | State consistency, freeze detection |
| S5 | Share screen at 720p, 30 fps, 2 Mbps; remote on a 3G‑simulated network | P2 | Automated (network throttling) | Bandwidth adaptation, quality degradation |
| S6 | Share screen with accessibility overlay (e.g., magnifier) enabled | P1 | Manual | Accessibility compatibility |
| S7 | Attempt to share screen when another app holds the display lock (e.g., secure keyboard) | P1 | Manual | Conflict handling, error messaging |
| S8 | Share screen, then switch user account via OS fast‑user‑switch | P2 | Manual | Session isolation, credential leakage |
| S9 | Share screen, then invoke system power‑saving mode | P2 | Automated | Power‑state handling, resume correctness |
| S10 | Share screen, remote participant uses a legacy browser without VP9 support | P2 | Manual | Codec fallback, interoperability |
How to Derive Your Own Matrix
- Identify Capture Modes – List every way a user can initiate sharing (full screen, specific window, browser tab, custom region).
- Define Remote Profiles – Create a matrix of receiver capabilities (browser version, OS, codec support, network conditions).
- Cross‑Product Risks – For each capture mode × remote profile pair, ask: *What could go wrong?* Assign a priority based on impact (user‑visible glitch, data leak, crash) and likelihood (frequency of the combination in your user base).
- Tag Mode – If the failure can be detected programmatically (e.g., pixel comparison, metric threshold), mark as Automated; otherwise, flag for Manual exploratory testing.
- Review Quarterly – Update the matrix when you add new capture options, deprecate old codecs, or observe new failure patterns in production.
Automation vs Manual: Where to Invest Effort
Deciding what to automate hinges on repeatability, observability, and cost of false negatives. The following heuristics help you split the workload.
Heuristic 1: Deterministic Outputs → Automate
If the test yields a quantifiable metric (frame‑by‑pixel difference, encode latency, bitrate) that can be compared against a threshold, automate it. Example: using ffmpeg to compute PSNR between a reference capture and the received stream.
# Capture reference locally
ffmpeg -f x11grab -r 30 -s 1920x1080 -i :0.0 -t 5 reference.yuv
# Receive stream via WebRTC and save to received.yuv (test harness does this)
# Compare
ffmpeg -i reference.yuv -i received.yuv -lavfi psnr="stats_file=psnr.log" -f null -
Heuristic 2: Transient UI States → Manual/Exploratory
Scenarios that depend on timing windows (e.g., a notification appearing exactly while sharing starts) are hard to reproduce reliably in scripted tests. Use manual exploratory sessions or persona‑driven bots that inject random events.
Heuristic 3: Security/Privacy Checks → Automate with Obfuscation
Detecting leaked pixels can be automated by comparing the shared frame against a mask of allowed regions. If any pixel outside the mask differs from a black baseline, flag a leak.
import cv2, numpy as np
ref = cv2.imread('mask.png', cv2.IMREAD_GRAYSCALE) # 1 = allowed, 0 = blocked
shared = cv2.imread('shared_frame.png', cv2.IMREAD_GRAYSCALE)
leak = cv2.bitwise_and(shared, cv2.bitwise_not(ref))
if np.any(leak > 10): # tolerance for compression noise
print("Potential leak detected")
Heuristic 4: Resource‑Intensive Scenarios → Manual with Instrumentation
Testing under extreme network conditions (e.g., 50 ms RTT, 5 % loss) can saturate CI runners. Reserve these for nightly runs or dedicated performance test rigs, but collect metrics automatically.
Heuristic 5: Cross‑Platform Fluidity → Automate via Device Farm
If you support Windows, macOS, Linux, iOS, and Android, automate the invocation of the sharing API on each platform using a device farm (e.g., Firebase Test Lab, AWS Device Farm). The verification step (remote view) can remain manual or be handled by a lightweight observer bot.
Practical Split Recommendation
| Category | % Automation | % Manual | Rationale |
|---|---|---|---|
| Core capture start/stop, window isolation | 80 | 20 | Deterministic, high regression risk |
| Notification/interruption handling | 30 | 70 | Timing‑dependent, exploratory |
| Bandwidth adaptation & QoE metrics | 70 | 30 | Metrics‑driven, can be throttled in CI |
| Security/privacy leak detection | 90 | 10 | Mask‑based pixel check is reliable |
| Accessibility compatibility | 40 | 60 | Subjective experience, needs assistive tech |
| Cross‑platform device‑farm invocation | 85 | 15 | API calls are scriptable; UI verification can be sampled |
Apply these ratios as a starting point, then adjust based on your defect leakage data: if manual exploratory sessions repeatedly find issues in a supposedly automated area, increase coverage there.
Tooling Choices for Screen Sharing Validation
Selecting the right tools influences both the depth of your tests and the speed of feedback. Below is a comparison of popular options grouped by function.
| Category | Tool | Language/Platform | Strengths | Limitations |
|---|---|---|---|---|
| Capture & Frame Extraction | ffmpeg / gstreamer | C/C++, CLI | Broad codec support, frame‑accurate extraction | Steep learning curve for complex filter graphs |
| WebRTC Signaling & Media | libwebrtc (via webrtc-bin) | C++, Python bindings | Full control of codec, simulcast, bandwidth estimation | Requires building native binaries for each OS |
| Automated UI Interaction | Appium (Android/iOS), Selenium/WebDriver (Web) | Java, JS, Python | Mature, integrates with CI | May struggle with secure desktop capture prompts |
| Persona‑Driven Exploration | SUSA Test Agent (CLI) | Python | Generates realistic user curves (impatient, elderly, etc.) without scripts | Commercial; requires APK or URL input |
| Network Condition Simulation | tc (Linux), Network Link Conditioner (macOS), Clumsy (Windows) | CLI/ GUI | Precise latency, loss, bandwidth shaping | Needs root/administrator rights |
| Video Quality Measurement | VMAF, PSNR, SSIM (via ffmpeg or vmaf) | C++/Python | Objective quality scores, correlates with MOS | VMAF training models add size |
| Observability & Metrics | Prometheus + Grafana, OpenTelemetry | Language‑agnostic | Time‑series correlation of capture, transport, render | Requires instrumenting both ends |
| Accessibility Validation | axe‑core, WCAG Contrast Checker | JS, CLI | Automated rule set for web‑based sharing UI | Limited for native desktop capture dialogs |
Example: End‑to‑End Automated Pipeline with Open Source
- Trigger – GitHub Actions workflow starts on PR.
- Spin up – Two Docker containers: sender (Ubuntu + Firefox) and receiver (Ubuntu + Chrome).
- Network shaping – Use
tcto impose 120 ms RTT, 5 % loss on the sender’seth0. - Initiate share – Selenium script clicks the “Share Screen” button, selects the Firefox window, and confirms.
- Capture – Receiver runs
ffmpeg -f x11grab -r 30 -s 1280x720 -i :0.0 -t 10 received.mkv. - Reference – Sender records the same region locally to
reference.mkv. - Compare –
ffmpeg -i reference.mkv -i received.mkv -lavfi psnr="stats_file=psnr.log" -f null -. - Gate – If average PSNR < 30 dB for >2 seconds, fail the job.
- Report – Push PSNR time‑series to Prometheus; Grafana dashboard shows trend across commits.
This pipeline catches regressions in capture fidelity, network adaptation, and encoder settings without any paid licenses.
CI/CD Integration Strategies for Screen Sharing Tests
Integrating screen sharing tests into CI/CD requires balancing test duration with feedback speed. The following patterns have proven effective in large‑scale organizations.
Pattern 1: Tiered Test Execution
- Fast Tier (≤5 min) – Run on every commit: basic start/stop, window isolation, PSNR threshold on a lossless LAN.
- Medium Tier (≤20 min) – Run on nightly schedules: add moderate network throttling (50 ms RTT, 2 % loss) and codec variant matrix (VP8, VP9, AV1).
- Heavy Tier (≥1 h) – Run weekly or pre‑release: full persona‑driven exploratory runs with SUSA, accessibility checks, and long‑duration soak tests (30 min sharing, monitoring for memory leaks).
Pattern 2: Artifact‑Based Promotion
Store the reference captures and received streams as build artifacts. If a later stage fails, you can diff the artifacts locally to see whether the regression is in capture, transport, or render. Use a naming convention like share-.
Pattern 3: Feature‑Flag‑Gated Test Suites
If your product rolls out a new sharing technology (e.g., AV1‑only mode) behind a flag, gate the corresponding test suite behind the same flag. This prevents the CI from failing on stable branches while still validating the experimental path in feature branches.
Pattern 4: Parallelization Across Device Pools
Leverage your device farm’s ability to run multiple sessions concurrently. For each sender platform (Windows, macOS, Linux), spawn a receiver matrix (Chrome, Firefox, Safari, Edge). Use a workflow manager like tox or noox to orchestrate the Cartesian product without blowing up queue times.
Pattern 5: Alerting on Metric Drift
Configure Prometheus alerts on key QoE metrics:
share_psnr_avg < 28for 5 min → criticalshare_frame_drop_rate > 0.02→ warningshare_encode_latency_p95 > 120ms→ info
Hook these alerts to your incident‑response channel (Slack, PagerDuty) so that a degradation is noticed before it reaches users.
Sample GitHub Actions Snippet (Fast Tier)
name: Screen Sharing Fast Tier
on:
push:
branches: [main]
pull_request:
jobs:
screen-share:
runs-on: ubuntu-latest
container:
image: ubuntu:22.04
options: --privileged # needed for tc and screen capture
steps:
- uses: actions/checkout@v4
- name: Install dependencies
run: |
apt-get update && apt-get install -y ffmpeg gstreamer1.0-tools \
chromium-browser selenium python3-pip
pip install selenium pytest
- name: Shape network (120ms RTT, 5% loss)
run: |
tc qdisc add dev eth0 root netem delay 120ms loss 5%
- name: Start receiver (ffmpeg grab)
run: |
ffmpeg -f x11grab -r 30 -s 1280x720 -i :0.0 -t 5 received.mkv &
sleep 2
- name: Run Selenium test (share window)
run: |
python -m pytest tests/test_screen_share_window.py
- name: Compare PSNR
run: |
ffmpeg -f lavfi -i "movie=reference.mkv,setpts=PTS-STARTPTS[ref]; \
movie=received.mkv,setpts=PTS-STARTPTS[rec]; \
[ref][rec]psnr=stats_file=psnr.log" -f null -
python -c "import json; d=open('psnr.log').read(); \
avg=float([l for l in d.split() if l.startswith('average:')][1]); \
exit(0 if avg>=30 else 1)"
- name: Upload artifacts
if: failure()
uses: actions/upload-artifact@v4
with:
name: screen-share-debug
path: |
received.mkv
reference.mkv
psnr.log
Adjust the image, dependencies, and test script to match your stack. The --privileged flag is required for tc and direct screen access on Linux runners.
Metrics, Coverage, and Observability
Beyond pass/fail, you need quantitative signals that tell you whether your screen sharing subsystem is healthy, degrading, or improving over time.
Core Metrics to Collect
| Metric | Definition | Collection Point | Alert Threshold (example) |
|---|---|---|---|
| Capture Latency | Time from user action to first encoded frame | Sender SDK (timestamp before/after encode) | >150 ms (p95) |
| Encode Bitrate | Actual kbps used by the encoder | Encoder callback | Outside target ±20 % |
| Packet Loss (RTCP) | Percentage of lost RTP packets | Receiver WebRTC stats | >2 % |
| Jitter | Variance in inter‑arrival time | Receiver WebRTC stats | >30 ms |
| Render Latency | Time from decoded frame to display on remote | Receiver rendering pipeline | >100 ms (p95) |
| PSNR / VMAF | Objective quality of received vs reference | Post‑process comparison | PSNR < 28 dB or VMAF < 70 |
| Freeze Duration | Consecutive frames with <1 % pixel change | Receiver frame diff | >500 ms |
| CPU / Memory Usage | Process consumption during share | Sender & receiver | CPU >80 % core, mem growth >10 %/min |
| Accessibility Violations | Number of WCAG AA failures in sharing UI | axe‑core scan | >0 |
| Security Leaks | Pixels outside allowed mask | Mask‑based pixel diff | >0 |
Building Coverage Models
- Requirement‑Based Coverage – Map each user story (e.g., “As a presenter, I can share a specific window”) to one or more test cases in your matrix. Track the percentage of stories with at least one automated test.
- Code‑Based Coverage – Use strumentation (e.g.,
llvm-cov,JaCoCo) to measure line/branch coverage of the sharing module. Aim for ≥85 % line coverage; prioritize uncovered paths that involve error handling (e.g., capture device busy, permission denied). - Scenario‑Based Coverage – Enumerate permutations of capture mode × remote profile × network condition. Use a combinatorial testing tool (like
PICTorACTS) to generate a minimal set that covers all pairwise interactions. Record the percentage of generated pairs that have an associated test.
Observability Architecture
- Sender Side – Export metrics via OpenTelemetry to a collector; include custom spans for
startShare,stopShare,encodeFrame. - Receiver Side – Capture WebRTC stats API (
getStats) and push the same collector. - Aggregator – Use Prometheus to scrape both endpoints; label each series with
sender_os,receiver_browser,network_profile. - Visualization – Grafana dashboards with panels for latency distributions, bitrate over time, and heatmaps of failure rates per configuration.
- Log Correlation – Include a unique test run ID in all logs and metrics; enable tracing to follow a frame from capture to render.
When a test fails, the observability stack lets you answer: *Was the failure due to a spike in encode latency, a burst of packet loss, or a render pipeline stall?* This reduces mean time to resolution (MTTR) dramatically.
Common Failure Modes Seen in Production
Even with thorough lab testing, certain issues only surface under real‑world usage patterns. Below are the most frequent failure modes we have observed, along with detection strategies.
Failure Mode 1: Permission Prompt Racing
On macOS and Windows 10+, the first screen‑share attempt triggers a system‑level consent dialog. If the test script clicks the Share button before the dialog appears, the share fails silently.
Detection: Add a explicit wait for the dialog’s appearance (using accessibility APIs) before proceeding. In CI, enable “allow automation to bypass prompts” only for internal builds; otherwise, treat the delay as a required step.
Failure Mode 2: Encoder Fallback Loops
When the preferred codec (e.g., AV1) is not hardware‑supported, some WebRTC implementations fall back to VP8, then to H.264, causing a noticeable bitrate spike and increased CPU.
Detection: Monitor the googCodecName stat from WebRTC getStats. Alert if the codec changes more than once during a stable‑network share.
Failure Mode 3: Notification Bleed‑Through
Certain OSes render notification banners in an overlay layer that is not obscured by the sharing window, leading to leaked personal data.
Detection: Use a mask‑based pixel diff as described earlier, with the mask defined by the OS‑provided sharing rectangle. Run this check on a subset of manual exploratory sessions where you generate real notifications (chat, email, calendar).
Failure Mode 4: Power‑State Induced Freeze
When a laptop switches to battery‑saver mode mid‑share, the OS may throttle the GPU, causing the encoder to drop frames and the receiver to see a freeze.
Detection: Instrument power‑state change events (/system/powerstate on Windows, IOPMrootDomain on macOS) and correlate with sudden increases in render latency or frame drops.
Failure Mode 5: Concurrent Audio/Video Contention
Screen sharing often runs alongside audio capture (mic) or video from a webcam. If both streams contend for the same encoder hardware, you may see dropped audio or video.
Detection: Capture separate stats for audio and video tracks; alert if either track’s packet loss exceeds 1 % while the other is nominal.
Failure Mode 6: Legacy Browser Incompatibility
Older versions of Safari lack support for simulcast, causing the sender to send a single high‑resolution stream that the receiver cannot downscale, resulting in choppy playback.
Detection: Include a matrix entry for Safari <14 with VP8; verify that the receiver reports googFrameRateDecoded matching the sender’s target.
Failure Mode 7: Accessibility Overlay Conflict
Screen magnifiers or contrast enhancers sometimes capture the screen at a different scale than the sharing pipeline, leading to blurry or shifted content for remote viewers.
Detection: Run tests with the system magnifier enabled at 150 % scale; compare the received frame to a reference captured at the same scale using OCR to verify text legibility.
Failure Mode 8: Session Switch Leakage
Fast‑user‑switch or remote desktop sessions can cause the sharing pipeline to retain a handle to the previous session’s display buffer, showing remnants of the old user’s desktop.
Detection: After a share, switch user via OS command, then switch back and verify that no foreign pixels appear in the shared frame (mask diff against a blank background).
Failure Mode 9: Network Mobility Handoff
When a user moves from Wi‑Fi to cellular, the ICE restart may cause a temporary black screen if the new candidate pair fails to establish.
Detection: Simulate network handoff using netsh (Windows) or nmcli (Linux) to change the interface mid‑share; monitor for iceConnectionState transitions and ensure recovery within 2 s.
Failure Mode 10: Resource Exhaustion in Long Sessions
A sharing session left open for several hours can gradually leak GDI objects or texture handles, culminating in a crash or severe performance degradation.
Detection: Run a soak test (≥4 h) with automated checks for handle counts (tasklist /m on Windows, leaks instrument on macOS) and assert that growth stays below a defined slope.
Each of these failure modes can be turned into a specific test case (manual or automated) and added to your matrix. Prioritize them based on observed incident frequency in your production logs.
Anti‑Patterns to Avoid in Screen Sharing Testing
Recognizing what not to do is as important as knowing the right practices. Below are common anti‑patterns that undermine effectiveness and waste effort.
Anti‑Pattern 1: Testing Only the “Happy Path”
Limiting tests to a successful start/stop flow misses edge cases like permission denials, device busy states, or network interruptions.
Fix: Ensure your matrix includes at least one failure‑inducing variant for each primary path (e.g., “Share window while another app holds the capture device”).
Anti‑Pattern 2: Over‑Reliance on Manual Exploratory Testing Without Metrics
Purely manual sessions generate valuable insights but are hard to regress and impossible to trend over time.
Fix: Pair exploratory runs with automated metric collection (e.g., record PSNR, capture latency) so that each session yields quantifiable data.
Anti‑Pattern 3: Ignoring Receiver Heterogeneity
Testing only on the latest Chrome on Windows leaves you blind to Firefox on Linux or Safari on iOS.
Fix: Use a device farm or virtual machines to cover the top‑5 receiver OS/browser combos that represent ≥80 % of your user base (per analytics).
Anti‑Pattern 4: Treating Screen Sharing as a Pure UI Test
Focusing solely on whether a button is clickable neglects the media pipeline and security implications.
Fix: Split your test suite into UI validation, media pipeline validation, and security/privacy validation, each with its own ownership and metrics.
Anti‑Pattern 5: Skipping Network Condition Simulation
Assuming a perfect LAN in CI masks adaptive bitrate bugs that only appear under loss or latency.
Fix: Integrate a network‑shaping step (tc, Clumsy, or NetEm) into every automated test that claims to validate adaptation.
Anti‑Pattern 6: Not Capturing Reference Frames Correctly
Using a screenshot as a reference can introduce scaling or color‑space differences that cause false positives.
Fix: Generate the reference by capturing the same region with the same pipeline (e.g., using ffmpeg with x11grab at the exact resolution and pixel format used by the sender under test).
Anti‑Pattern 7: Overlooking Accessibility Overlays
Running tests with the default OS settings misses issues that appear when users enable high contrast, larger cursors, or screen readers.
Fix: Include a configuration matrix for accessibility features (magnifier, contrast, cursor size) and run a subset of tests under each.
Anti‑Pattern 8: Failing to Clean Up Resources
Leaving open capture devices, WebRTC peer connections, or file handles between tests can cause flaky results due to resource exhaustion.
Fix: Implement rigorous teardown hooks (afterEach) that call peerConnection.close(), releaseCaptureDevice(), and delete temporary files.
Anti‑Pattern 9: Using Hard‑Coded Timings Instead of Event‑Based Waits
Fixed sleep statements make tests brittle across machines with different performance.
Fix: Wait for explicit signals: getStats reporting googActiveConnection=true, or a UI element indicating “Sharing…”, before proceeding.
Anti‑Pattern 10: Neglecting to Version Test Artefacts
Storing reference captures outside version control makes it impossible to reproduce a test run from a specific commit.
Fix: Store reference media in your repo (or a linked LFS store) with a naming convention that includes the commit SHA and test ID.
By auditing your test suite against these anti‑patterns, you can eliminate sources of false confidence and improve the reliability of your screen sharing verification.
How Autonomous Persona‑Driven Exploration Reinforces Screen Sharing Testing
Autonomous testing platforms that simulate real user behaviors add a complementary dimension to scripted checks. They expose issues that arise from atypical interaction patterns, timing variations, and cognitive load—factors that are hard to encode in deterministic test cases.
Persona Profiles that Matter for Screen Sharing
| Persona | Typical Behavior | Relevance to Screen Sharing |
|---|---|---|
| Curious | Clicks every UI element, explores hidden menus | May trigger obscure sharing options or developer‑only debug menus |
| Impatient | Rapidly clicks, aborts long‑running actions | Tests race conditions, premature cancellation of share initiation |
| Novice | Follows tool‑tips, makes frequent mistakes | Validates clarity of permission prompts and error messages |
| Adversarial | Attempts to bypass restrictions, injects unusual input | Probes for security leaks, privilege escalation via sharing |
| Elderly | Slower interactions, prefers larger UI elements | Checks that sharing UI remains usable with increased touch targets |
| Accessibility User | Relies on screen readers, high contrast, keyboard navigation | Ensures that sharing controls are reachable and announced correctly |
| Power User | Uses keyboard shortcuts, multi‑monitor setups | Validates multi‑monitor selection, shortcut‑based start/stop |
| Multitasker | Keeps chat, file transfer, and other apps active while sharing | Tests resource contention and background interference |
An autonomous agent can be instructed to emulate each of these personas over a defined time window (e.g., 15 minutes per persona) while the application under test is running. The agent generates raw input events (taps, clicks, keystrokes, scrolls) according to a probabilistic model that reflects the persona’s tendencies.
Integrating Persona‑Driven Runs into CI
- Trigger – Add a separate workflow that runs on a nightly schedule or on feature branches with the label
persona-test. - Launch Agent – Use the SUSA CLI (
susatest-agent run --apk ./app.apk --personas curious,impatient,novice) to start the exploration. The agent will automatically handle permission dialogs, attempt various sharing methods, and inject interruptions (notifications, incoming calls). - Collect Metrics – The agent streams WebRTC stats and frame‑by‑frame PSNR to a sidecar Prometheus exporter.
- Evaluate – After the run, compare aggregated QoE metrics against baselines. If any persona shows a statistically significant drop (e.g., >15 % increase in frame loss for the adversarial persona), flag the build for review.
- Feedback Loop – The agent also records the sequence of actions that led to a failure, producing a reproducible script that developers can rerun locally.
Concrete Example: Finding a Permission‑Race Bug
During a nightly persona run, the “impatient” avatar repeatedly tapped the Share button twice within 200 ms of the first tap. The agent’s log showed:
[00:12.3] Tap ShareButton
[00:12.4] System permission dialog appears (macOS)
[00:12.5] Tap ShareButton again (before user responded)
[00:12.6] Share session failed with error code -1007 (denied)
The deterministic test suite never exercised this double‑tap scenario because it waited for the dialog to appear before proceeding. Adding a manual step that tolerates rapid clicks uncovered a race condition where the second tap was interpreted as a new share request while the first was still pending, causing the underlying capture device to be locked and the share to abort.
Benefits of Comb
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