UI/UX Part 27 — UI Testing, Screenshot/Interaction Tests & Release Quality Gates Architecture

Reusable P2P Communication Platform

Status: UI/UX architecture specification
UI Series: Part 27
Desktop UI: Dioxus
Android UI: Kotlin + Jetpack Compose
Core runtime: Rust
Primary purpose: define the complete UI testing, screenshot/golden testing, interaction automation, accessibility validation, performance regression, process-death/recovery, permission/system-state, deterministic fixture, CI orchestration, flake control, artifact retention, and release quality-gate architecture across desktop and Android.


1. Purpose

A complex communication platform cannot rely on:

manual smoke testing
developer confidence
happy-path screenshots

as a release strategy.

The product contains:

messaging
calls
files
search
contacts
groups
pairing
security
backup
emergency
settings
plugins
diagnostics
adaptive layouts
accessibility
offline/local-first behavior

and every one of those surfaces can regress independently.

The governing principle is:

Every important UX promise must have a reproducible automated or structured manual verification path, and core regressions must block release.


2. Architectural Position

Shared Rust Product Testkit
        │
        ├── deterministic fixtures
        ├── fake clock
        ├── fake network
        ├── fake permissions
        ├── fake device graph
        ├── fake storage
        ├── event scripting
        └── scenario snapshots
        │
   ┌────┴─────┐
   │          │
Dioxus     Compose
Tests      Tests
   │          │
Screenshot / Interaction / Accessibility / Performance
        │
        ▼
Release Quality Gates

3. Test Pyramid

Recommended layers:

Presentation Model Tests
Component Tests
Screen Tests
Interaction Tests
System Integration Tests
Visual Regression Tests
Accessibility Tests
Performance Tests
Release Smoke Tests

4. Presentation Model Tests

Fastest layer.

Test:

state transitions
capability mapping
error mapping
loading/degraded states
navigation state

without rendering full UI.


5. Component Tests

Test reusable components:

Button
ListRow
MessageBubble
Banner
Dialog
Progress
SettingsRow
FileTile
CallControl

6. Screen Tests

Render complete feature screen with deterministic fixture.


7. Interaction Tests

Verify user tasks:

tap/click
keyboard
back
scroll
search
send
retry
confirm
cancel

8. System Integration Tests

Exercise:

UI
→ Presentation Service
→ Rust Core

with controlled infrastructure.


9. Visual Regression

Screenshot/golden comparison.


10. Accessibility Tests

Semantic tree + keyboard/TalkBack/manual matrix.


11. Performance Tests

Measure:

startup
scrolling
navigation
search
memory
event backlog

12. Release Smoke

Small production-like suite on final artifacts.


13. Shared Testkit

Recommended crate:

comm-ui-testkit

14. Testkit Responsibilities

Provide:

fixture builders
scenario scripting
fake clocks
fake IDs
fake network state
fake permissions
fake storage pressure
fake plugin events
fake security events
fake emergency events

15. Deterministic IDs

Use fixed IDs in tests.

Example:

ConversationId("conv-alice")
MessageId("msg-001")

16. Deterministic Clock

All tests use fake time where timing matters.


17. Fake Clock API

#![allow(unused)]
fn main() {
pub trait TestClock {
    fn now(&self) -> Timestamp;
    fn advance(&self, duration: Duration);
}
}

18. Why Fake Time

Required for:

typing TTL
presence expiry
message retry
SOS countdown
backup age
notification quiet hours
temporary debug logging

19. Deterministic Randomness

Seed any generated:

avatar colors
fixture data
random IDs

20. Fake Network

Must simulate:

online
offline
relay-only
LAN-only
nearby-only
DTN
packet loss
high latency
route switch

21. Fake Device Graph

Simulate:

single device
two trusted devices
revoked device
pending device
peer nearby
peer offline

22. Fake Permission Model

Simulate:

not requested
granted
denied
blocked
unavailable

23. Fake Storage

Simulate:

normal
low
critical
full
corrupt
read-only

24. Fake Plugin Runtime

Simulate:

healthy
slow
crashed
quarantined
permission escalation

25. Fixture Size Classes

Recommended:

Tiny
Small
Realistic
Large
Stress

26. Tiny

Use for component tests.


27. Small

Use for interaction tests.


28. Realistic

Use for screenshots.


29. Large

Use for virtualization/performance.


30. Stress

Use for regression/stability.


31. Screenshot Test Philosophy

Golden tests should validate:

layout
spacing
typography
state visibility
responsive behavior
theme

not pixel-perfect platform noise where unstable.


32. Screenshot Canonical States

Every major screen should have:

default
loading
empty
offline
degraded
error
selected/detail

where applicable.


33. Theme Matrix

Capture:

light
dark
high contrast

34. Text Matrix

Capture at least:

default text
large text

35. Locale Matrix

Capture:

LTR
RTL

36. Form-Factor Matrix

Capture canonical:

phone compact
tablet expanded
foldable book
desktop compact
desktop wide

37. Screenshot Naming

Example:

conversation_timeline_dark_rtl_phone.png

38. Golden Storage

Version-controlled or CI artifact-managed.


39. Golden Update Policy

Never auto-accept visual diffs.

Human review required.


40. Visual Diff Review

Reviewer checks:

intentional?
accessible?
consistent?
cross-platform impact?

41. Thresholds

Small anti-aliasing noise can use controlled tolerance.


42. Avoid Huge Pixel Tolerance

Would hide real regressions.


43. Masking

Only mask truly nondeterministic regions:

system clock
OS-specific window chrome

44. Do Not Mask Product Content

Hard rule.


45. Android Screenshot Tests

Use Compose screenshot tooling and deterministic emulator/device configuration.


46. Android Test Device Profiles

Recommended:

small phone
modern phone
tablet
foldable

47. Android API Coverage

Test at least:

minimum supported API
representative mid API
latest supported API

48. Android Density

Canonical density per screenshot profile.


49. Android Font Scale

Include:

1.0
1.3+
2.0 for critical screens

50. Android Navigation Mode

Where practical test:

gesture nav
3-button nav

for inset-sensitive screens.


51. Android Cutout

At least one profile.


52. Android Foldable

Use posture emulator/test environment where possible.


53. Dioxus Screenshot Tests

Render deterministic desktop window sizes.


54. Desktop Platforms

Release-grade coverage:

Linux
Windows
macOS

as supported.


55. Linux Desktop

Prefer at least one Wayland environment.


56. Desktop Window Sizes

Canonical:

minimum
compact
wide
ultrawide

57. Desktop DPI

At least:

100%
150%/200%

where practical.


58. Desktop Theme

Light/dark/high contrast.


59. Desktop Window Chrome

Mask only OS-owned chrome if unstable.


60. Interaction Test Principles

Tests should validate user outcomes, not implementation internals.


61. Good Interaction Test

open conversation
type message
send
message appears as queued
network resumes
message becomes delivered

62. Bad Interaction Test

assert internal signal index == 4

63. Semantic Selectors

Use:

accessible label
stable test tag
semantic role

64. Avoid Coordinate-Based Tests

Hard rule except graphics-specific surfaces.


65. Test IDs

Stable test IDs permitted.

Do not expose them to user UX.


66. Keyboard Tests

Desktop core flows:

navigate inbox
open conversation
send message
search
open command palette
manage settings
answer/decline call
open security center

67. Mouse Tests

Secondary.

Keyboard coverage remains mandatory.


68. Android Touch Tests

Use semantic node interactions.


69. Android Back Tests

Critical.

Verify:

dialog
sheet
detail
list
root

behavior.


70. Predictive Back

Test where supported.


71. Scroll Tests

Verify:

anchor preservation
new-message behavior
pagination
virtualization

72. Message Timeline Tests

Required:

recent load
older prepend
new append
scrolled-up new message
reply jump
edit
delete
reaction
delivery state

73. Composer Tests

Required:

draft autosave
reply
edit
attachment
voice note
offline send
commit failure
duplicate tap

74. Inbox Tests

Required:

unread
typing
draft
pin
archive
mute
request
reorder

75. Call Tests

Required:

incoming
outgoing
accept
decline
mute
camera
route switch
reconnect
PiP
background
end

76. Contacts Tests

Required:

add
request
accept
verify
identity changed
block
unblock

77. Group Tests

Required:

create
invite
join
role change
remove
ban
transfer ownership
leave

78. File Tests

Required:

download
pause
resume
cancel
retry
viewer
share
save
storage full
verification failure

79. Search Tests

Required:

rapid query
filters
pagination
jump to source
index rebuilding
no results

80. Pairing Tests

Required:

QR
manual code
SAS
expired code
wrong code
device link

81. Notification Tests

Required:

foreground suppression
background alert
tap
mark read
call notification
security notification

82. Presence Tests

Required:

online
away
unknown
typing
recording
receipt privacy

83. Security Tests

Required:

new device
revoke
lost device
recovery setup
recovery rotate
identity warning
critical event

84. Backup Tests

Required:

create
verify
cancel
storage full
restore inspect
dry run
restore
export
migration

85. Emergency Tests

Required:

activate
cancel countdown
offline store
relay
acknowledge
respond
resolve
expiry
location denied

86. Settings Tests

Required:

device-local
account-wide
managed
offline change
reset
privacy
retention

87. Plugin Tests

Required:

install
permission review
enable
disable
update
permission escalation
crash
quarantine
remove

88. Diagnostics Tests

Required:

network degraded
connection test
support bundle
daemon stopped
log viewer
developer mode

89. Onboarding Tests

Required:

create
link
recover
offline
skip optional
permission denied
resume

90. Adaptive Layout Tests

Verify every core flow in:

compact
expanded
foldable
desktop wide

91. Process Death Tests

Android critical flows:

composer draft
device link
backup
active call
SOS
onboarding

92. App Restart Tests

Desktop equivalent.


93. Crash Recovery Tests

Inject crash between durable phases.


94. Fake Crash Hooks

Testkit can expose:

crash after draft persist
crash after backup snapshot
crash before restore commit

95. Permission State Tests

Android:

denied
don't ask again
system settings changed while app open

96. System State Tests

Simulate:

battery saver
low storage
offline
notification blocked
camera unavailable
microphone unavailable

97. Accessibility Automated Tests

Check:

labels
roles
focusability
touch target
contrast where tool supports

98. Accessibility Manual Gates

Core release requires manual verification with:

TalkBack
keyboard
large text
RTL

99. Screen Reader Scenario Tests

Documented scripts.


100. TalkBack Script Example

Open Chats
Open first conversation
Read latest message
Reply
Send
Open details
Return

101. Keyboard Script Example

Launch
focus rail
open Chats
open conversation
focus composer
send
search
return

102. Focus Regression Tests

Verify dynamic updates do not steal focus.


103. Large Text Tests

Critical screens at:

200%

104. RTL Tests

At least:

Inbox
Conversation
Settings
Security
SOS

105. Color Independence Tests

Use grayscale screenshots for critical states.


106. Reduced Motion Tests

Ensure no required meaning disappears.


107. Performance Gate Integration

Part 26 budgets become CI thresholds.


108. Startup Gate

Measure:

cold start
first useful paint

109. Scroll Gate

Measure:

frame p95
dropped frames

110. Search Gate

Measure first-page latency.


111. Memory Gate

Long-run memory growth bounded.


112. Event Backlog Gate

High event load cannot exceed safe sustained threshold.


113. Large Data Fixtures

Synthetic datasets:

10k conversations
1M messages
100k files
10k contacts
10k group members

114. No Production Data in Tests

Hard rule.


115. Fixture Privacy

Synthetic only.


116. Fuzz/Property Test Integration

Backend protocol fuzzing remains separate but UI presentation can property-test:

arbitrary event ordering
duplicate events
stale revisions
missing pages

117. State Machine Testing

Useful for:

call
transfer
backup
SOS
device link

118. Model-Based Tests

Define legal transition model.


119. Example Call Model

Idle
→ Incoming
→ Active
→ Reconnecting
→ Active
→ Ended

120. Illegal Transition

UI should not crash if backend sends unexpected but representable state.


121. Snapshot Contract Tests

Rust and UI DTO serialization compatibility.


122. Postcard Compatibility Tests

Where IPC/wire presentation uses Postcard.


123. JNI Contract Tests

Verify:

type mapping
nullability
large list paging
error propagation

124. No Giant JNI Payload Test

Assert size limits.


125. Daemon IPC Contract Tests

Desktop daemon mode:

snapshot
event
reconnect
revision gap

126. Event Gap Tests

Drop event intentionally.

UI must resnapshot.


127. Duplicate Event Tests

UI remains idempotent.


128. Out-of-Order Event Tests

Rust revision/state wins.


129. Test Environment Determinism

Pin:

locale
timezone
font scale
theme
window size
clock
random seed

for screenshots.


130. Font Rendering Variance

Platform-specific goldens preferred.


131. Avoid Cross-OS Pixel Golden

Hard rule.


132. Per-Platform Golden

Keep:

Linux golden
Windows golden
macOS golden
Android golden

where needed.


133. Screenshot Diff Artifact

CI should publish:

expected
actual
diff

134. Failure Artifact Bundle

For failed interaction test include:

screenshot
semantic tree
logs
test steps
video if available

135. Android Failure Artifacts

Potential:

logcat
screen recording
hierarchy dump

redacted/test-only.


136. Desktop Failure Artifacts

Potential:

screenshot
UI tree
app log
window state

137. CI Test Tiers

Recommended:

PR Fast
PR Full
Nightly
Release Candidate
Post-Release Smoke

138. PR Fast

Runs:

unit
presentation
component
small interaction
lint

139. PR Full

Runs:

screenshots
major interaction suites
accessibility automated
selected performance

140. Nightly

Runs:

all platforms
large data
stress
process death
long-running

141. Release Candidate

Runs complete quality matrix on signed candidate artifacts.


142. Post-Release Smoke

Verifies distributed binaries/APK.


143. CI Sharding

Shard by:

feature
platform
form factor
test type

144. Avoid One Giant UI Job

Hard rule.


145. Test Parallelism

Use bounded parallelism to avoid host contention causing flakiness.


146. Emulator Isolation

One test worker per emulator.


147. Desktop Window Isolation

Avoid overlapping windows/interference.


148. Network Test Isolation

Each scenario uses isolated fake network namespace/runtime.


149. Flaky Test Policy

A flaky test is a bug.


150. Do Not Permanently Retry Until Green

Hard rule.


151. Temporary Retry

May confirm flake during investigation, but test remains tracked/blocking according to policy.


152. Flake Metadata

Record:

test
platform
failure class
frequency
owner

153. Quarantine Policy

Only with:

issue
owner
expiry

154. Quarantine Cannot Hide Critical Core Flow

Examples that must not be quarantined long-term:

send message
answer call
SOS cancel
device revoke
restore backup

155. Release Quality Gates

Define hard blockers.


156. Gate 1 — Build

All target artifacts build/sign/package.


157. Gate 2 — Core Interaction

Pass:

send message
receive message
call
file transfer
search
security
backup

158. Gate 3 — Accessibility

No critical accessibility regressions.


159. Gate 4 — Visual Regression

All intentional diffs reviewed.


160. Gate 5 — Performance

No unacceptable regression beyond agreed threshold.


161. Gate 6 — Crash

No release-blocking crash in smoke/stress.


162. Gate 7 — Security UX

Critical security flows behave correctly.


163. Gate 8 — Emergency UX

SOS lifecycle passes.


164. Gate 9 — Offline/Degraded

Local-first behavior passes with no Internet.


165. Gate 10 — Upgrade/Migration

Previous-version state upgrades successfully.


166. Gate Severity

#![allow(unused)]
fn main() {
pub enum QualityGateSeverity {
    Informational,
    Warning,
    Blocking,
}
}

167. Release Blocker Examples

message send duplicate
call cannot hang up
SOS falsely shows delivered
recovery key leaks in log
TalkBack cannot activate send
restore corrupts current data

168. Warning Examples

minor spacing drift
non-critical animation mismatch

169. Visual Review Ownership

At least:

UI reviewer
accessibility-aware reviewer for critical changes

where team size permits.


170. Snapshot Approval

Approval records:

commit
reviewer
reason

171. Baseline Change

Intentional design change updates golden in same PR.


172. No Hidden Golden Regeneration

Hard rule.


173. Test Documentation

Each major feature has:

happy path
failure path
offline path
accessibility path

174. Test Scenario Format

Recommended declarative scenario:

(
    name: "offline_send_then_deliver",
    initial: (...),
    steps: [...],
    expected: [...],
)

175. Shared Scenario DSL

Optional but valuable.


176. Scenario Runner

Can drive:

Rust presentation directly
Dioxus UI
Compose UI

with same scenario intent.


177. Shared Scenario Example

Given:
    conversation exists
    network offline

When:
    user sends "hello"

Then:
    message is queued

When:
    network becomes available

Then:
    message becomes sent/delivered

178. Cross-Platform Contract Testing

Same semantic scenario should produce same product truth.

Visual layout may differ.


179. Cross-Platform Divergence

Allowed only for:

platform interaction
system permission behavior
navigation presentation

180. Test Data Builder

Example:

#![allow(unused)]
fn main() {
ConversationFixture::new()
    .with_messages(100)
    .with_unread(5)
    .with_typing("alice")
}

181. Security Fixture Builder

Example:

#![allow(unused)]
fn main() {
SecurityFixture::new()
    .with_unknown_device()
    .with_recovery_configured()
}

182. Emergency Fixture Builder

Example:

#![allow(unused)]
fn main() {
EmergencyFixture::active()
    .with_waiting_recipient()
    .with_acknowledged_recipient()
}

183. Large Data Generator

Deterministic synthetic generator.


184. Localization Test Data

Include:

long German-like strings
Arabic/Urdu
Hindi
CJK
emoji
mixed bidi

185. Extreme Names

Test:

very long contact names
emoji-only names
combining marks
RTL names

186. Extreme Message Content

Bounded but test:

long text
code
mixed script
many reactions
multiple attachments

187. Empty/Null Edge Cases

Test missing:

avatar
presence
timestamp
preview
device metadata

where schema allows.


188. Error Injection

Testkit can inject failures at defined boundaries.


189. Error Injection Points

Examples:

DB read
DB write
network send
thumbnail decode
backup write
plugin invoke
notification post

190. No Random Chaos in PR Fast

Deterministic injection.


191. Chaos Nightly

Optional seeded chaos/stress.


192. Long-Running Soak

Nightly/release:

message traffic
presence
transfers
plugins
window navigation

for hours if CI budget allows.


193. Memory Leak Soak

Track process memory over repeated scenarios.


194. Handle Leak Tests

Files/media/call surfaces.


195. Resource Cleanup Tests

After close/end:

subscriptions removed
handles released
timers stopped

196. Screenshot Privacy

Use synthetic names/content only.


197. No Real Contacts in Golden Artifacts

Hard rule.


198. Support Bundle Test

Verify generated test support bundle redaction.


199. Secret Canary

Inject known fake secret:

TEST_RECOVERY_SECRET_123

Then assert it never appears in:

logs
support bundle
screenshots unless explicitly on sensitive test screen

200. Privacy Canary

Same for:

message body
precise location

201. Accessibility Canary

Custom test components can intentionally omit label to ensure lint/gate catches.


202. Plugin Accessibility Gate Test

Malformed plugin UI schema rejected.


203. Visual Token Gate

Intentional invalid contrast fixture ensures validator fails.


204. Test Ownership

Every suite has code owner/team role.


205. Failure Triage

Classify:

product bug
test bug
environment bug
flaky
infra

206. Environment Bug

Must still be investigated; do not label every unstable UI test as infra.


207. Test Runtime Budget

Track test suite duration.


208. Slow Test Reporting

Identify slowest tests.


209. Parallel Shard Balance

Keep shards roughly equal.


210. Caching

Cache:

build artifacts
dependencies
emulator images

but not mutable golden outcomes.


211. Artifact Retention

Keep:

failed screenshots
diffs
logs
videos
performance reports

for configured CI retention.


212. Release Evidence

For release candidate retain:

quality summary
test counts
platform matrix
performance results
accessibility checklist
visual diff approvals

213. Quality Dashboard

Optional internal tool.

Shows:

pass/fail
flakes
performance trends
visual changes
accessibility status

214. Do Not Expose Internal Test Dashboard to End Users


215. Release Checklist

Generated from gates.


216. Manual Exploratory Testing

Still valuable.

Focus on:

novel interactions
visual polish
unexpected flows
platform quirks

217. Manual Testing Is Supplement

Not substitute for automated core coverage.


218. Beta Channel

Can add production feedback before stable.


219. Crash Monitoring

Post-release can inform regressions.


220. Privacy

Production monitoring remains privacy-safe.


221. Rollback Criteria

Define when release should be halted/rolled back.

Examples:

crash spike
message loss
security regression
call failure
backup corruption

222. Feature Flag Rollback

Where architecture supports, non-core feature can be disabled.


223. Core Security Cannot Depend on Remote Kill Switch

Local safe behavior required.


224. Release Candidate Artifact Testing

Test exact artifact that will ship.


225. No Rebuild After Passing Final Gate

Promote exact binary/APK where release process supports.


226. Android Final Artifact

Test signed:

APK/AAB-derived install

227. Desktop Final Artifact

Test packaged:

AppImage/deb/rpm/exe/msi/dmg

as applicable.


228. Installer Tests

Verify:

install
upgrade
uninstall
data preservation

229. Upgrade Tests

At least:

previous stable → candidate

230. Downgrade

If unsupported, detect and fail safely.


231. Data Migration Tests

Ensure:

database
settings
plugin state
backup schema

migrate.


232. Backup Compatibility Tests

Restore older supported backup.


233. Plugin Compatibility Tests

Existing plugins remain compatible or clearly disabled.


234. Accessibility Upgrade Regression

Settings/accessibility choices preserved.


235. Notification Channel Upgrade

Android channels remain stable.


236. Desktop Window Layout Upgrade

Recover old saved layout safely.


237. Release Quality Model

#![allow(unused)]
fn main() {
pub struct ReleaseQualitySummary {
    pub blocking_failures: u32,
    pub warnings: u32,
    pub flaky_tests: u32,
    pub performance_regressions: u32,
    pub visual_diffs_pending: u32,
    pub accessibility_blockers: u32,
}
}

238. Release Decision

#![allow(unused)]
fn main() {
pub enum ReleaseDecision {
    Pass,
    PassWithWarnings,
    Block,
}
}

239. Gate Evaluation

#![allow(unused)]
fn main() {
pub trait ReleaseGate {
    fn evaluate(
        &self,
        evidence: &ReleaseEvidence,
    ) -> ReleaseGateResult;
}
}

240. Shared UI Testkit API

#![allow(unused)]
fn main() {
pub trait UiScenarioHarness {
    async fn apply(
        &mut self,
        step: ScenarioStep,
    ) -> Result<(), TestFailure>;

    async fn snapshot(
        &self,
    ) -> Result<ScenarioSnapshot, TestFailure>;
}
}

241. Scenario Step

#![allow(unused)]
fn main() {
pub enum ScenarioStep {
    AdvanceTime(Duration),
    SetNetwork(TestNetworkState),
    SetPermission(AppCapability, CapabilityPermissionState),
    InjectEvent(TestEvent),
    InjectFailure(TestFailurePoint),
}
}

242. UI Driver Separate

Platform UI drivers perform:

click/tap
type
scroll
back
keyboard

243. Product-State Harness

Rust harness controls environment.


244. This Separation Prevents Brittle Tests

The UI test should not need to manipulate internal DB rows manually.


245. Developer Test Screen

Optional internal route:

Component Gallery
Scenario Launcher
Fake Network
Permission Simulator

disabled in production.


246. Screenshot Gallery

Useful for manual visual audit.


247. Test Build Flag

Developer/test utilities only in:

debug/test/internal builds

248. No Test Backdoor in Production

Hard rule.


249. Security Review of Test Hooks

Ensure test-only endpoints cannot compile into production accidentally.


250. CI Compile Gate

Fail if production build contains:

test harness
fake authentication
debug secret viewer

251. Accessibility Release Gate

Blocking examples:

Send inaccessible to TalkBack
keyboard trap
critical confirmation not reachable

252. Performance Release Gate

Blocking examples:

timeline unusable
startup doubles beyond agreed threshold
unbounded memory growth

253. Visual Release Gate

Blocking examples:

critical controls clipped
RTL broken
security warning invisible

254. Security UX Release Gate

Blocking examples:

revoked device still shown trusted
identity warning dismissed as resolved
recovery secret exposed

255. Emergency UX Release Gate

Blocking examples:

false delivered status
cancel inaccessible
SOS lost after process death when continuity promised

256. Backup UX Release Gate

Blocking examples:

failed backup shown verified
restore mutates before confirmation

257. Offline UX Release Gate

Blocking example:

app cannot open local history without Internet

258. Plugin UX Release Gate

Blocking examples:

permission escalation silently granted
plugin crash crashes app

259. Data Loss Is Always Blocking

Hard rule.


260. Secret Leakage Is Always Blocking

Hard rule.


261. Critical Accessibility Regression Is Blocking

Hard rule.


262. Test Coverage Philosophy

Do not chase meaningless line percentage alone.


263. Coverage Priority

Prioritize:

state machines
critical user tasks
failure paths
security boundaries
offline behavior

264. Mutation Testing

Useful selectively for:

permission logic
security warnings
state transitions

265. Test Naming

Use behavior names.

Good:

offline_send_stays_queued_until_route_returns

266. Bad Test Name

test_42

267. Failure Messages

Should explain expected semantic outcome.


268. Test Documentation Linkage

Each architecture part maps to test suite.


269. Example Mapping

Part 05 → conversation timeline tests
Part 15 → security center tests
Part 17 → SOS tests
Part 23 → adaptive layout tests

270. Quality Gate Matrix by Part

Maintain central matrix so no UI architecture area lacks validation.


271. Initial Production Scope

Ship:

shared Rust UI testkit
deterministic fake clock/network/permissions/storage
presentation tests
Compose screen/interaction tests
Dioxus screen/interaction tests
platform-specific screenshot goldens
light/dark/high-contrast/RTL/large-text fixtures
keyboard/TalkBack release scripts
process-death/restart tests
large-data performance gates
visual diff artifacts
flaky-test tracking
PR/nightly/release CI tiers
release blocker policy
exact-artifact final smoke

Defer:

massive cloud device farm
AI-based visual approval
fully autonomous exploratory testing
remote live device lab

unless later justified.


272. Definition of Done

UI/UX Part 27 is complete when:

  • presentation, component, screen, interaction, integration, visual, accessibility, performance, and release-smoke layers are defined
  • a shared deterministic Rust comm-ui-testkit can script product state for both Dioxus and Compose
  • clocks, network paths, permissions, storage pressure, plugins, security, and emergency state can be simulated deterministically
  • screenshots cover canonical themes, text scales, locales, and form factors
  • screenshot baselines are platform-specific and never auto-approved
  • interaction tests select semantic nodes rather than coordinates
  • keyboard-only desktop and TalkBack Android core-task scripts are release gates
  • process-death/restart, offline, permission, crash, upgrade, and migration scenarios are covered
  • Part 26 performance budgets become measurable CI gates
  • large synthetic datasets validate virtualization and memory behavior
  • duplicate/out-of-order/event-gap behavior is tested
  • support-bundle/secret-redaction canaries prevent sensitive-data leakage
  • flaky tests are tracked as bugs and cannot silently become permanent retries
  • PR, nightly, release-candidate, and final-artifact test tiers are defined
  • exact binaries/APKs intended for release are what pass final smoke tests
  • data loss, secret leakage, critical accessibility regressions, and core security/emergency failures always block release
  • release evidence is retained and reviewable

273. Final Architecture

                    SHARED RUST TESTKIT
                            │
       ┌────────────────────┼────────────────────┐
       │                    │                    │
   Fixtures             Simulation           Scenarios
       │                    │                    │
 Messages/Files       Time/Network        User/Product
 Security/SOS         Permission/IO       State Machines
       │                    │                    │
       └────────────────────┼────────────────────┘
                            │
                ┌───────────┴───────────┐
                │                       │
             Dioxus                  Compose
             Desktop                 Android
                │                       │
       Interaction/Golden      Interaction/Golden
                │                       │
                └───────────┬───────────┘
                            │
                  RELEASE QUALITY GATES

274. Final Principle

Testing architecture should make regressions expensive to ship, not expensive to discover.

The correct model is:

deterministic fixtures
+
shared product scenarios
+
platform-native interaction tests
+
visual/accessibility/performance gates
+
exact release-artifact smoke testing

not:

manual QA at the end
+
hope

This gives Dioxus desktop and Android Compose a repeatable production-quality release process that validates the same Rust product truth across platforms while still testing each platform's native interaction and rendering behavior.