Skip to content

Testing and Quality Gates

QenTerra edited this page Jul 29, 2026 · 2 revisions

Testing and Quality Gates

The repository separates deterministic automated verification from live Telegram and macOS acceptance.

Complete repository gate

Run:

xcodegen generate --spec project.yml
swiftformat Unspool UnspoolTests UnspoolUITests --lint
swiftlint lint --config .swiftlint.yml
xcodebuild \
  -project Unspool.xcodeproj \
  -scheme Unspool \
  -destination 'platform=macOS,arch=arm64' \
  -only-testing:UnspoolTests \
  test
xcodebuild \
  -project Unspool.xcodeproj \
  -scheme Unspool \
  -destination 'platform=macOS,arch=arm64' \
  build-for-testing
git diff --check

The direct gate:

  1. regenerates the Xcode project from project.yml;
  2. runs SwiftFormat in lint mode;
  3. runs SwiftLint;
  4. executes the unit-test target on arm64 macOS;
  5. runs build-for-testing for the shared scheme, compiling the app and UI-test bundle.

Unit and integration-style coverage

The current test source covers:

  • app identity and window geometry;
  • preferences defaults, persistence, and concurrency clamping;
  • arbitrary extension classification;
  • original filename preservation and neutral fallback;
  • combined filters and sort;
  • eligible-only selection and chat isolation;
  • all-history pagination past approximate totals and short pages;
  • boundary-message compensation for bounded scans;
  • cache separation by chat and range and bounded eviction;
  • chat pagination, updates, ordering, and cached restore;
  • TDLib attachment mapping for music and documents;
  • request correlation, out-of-order responses, cancellation, typed errors, shutdown, redaction, and 64-bit identifier precision;
  • production session configuration and ordered events;
  • authorization state commands, errors, expiration, account switching, and sign out;
  • Keychain round-trip and deletion;
  • destination conflicts, explicit Replace and Save a Copy, and filename preservation;
  • attachment, history, and pending-session persistence;
  • application-level filters, selection, chat switching, retry, and recovery presentation.

Fakes simulate TDLib envelopes and transports. Temporary directories isolate filesystem tests. UI fixtures use a separate preferences suite.

UI-test scenarios

The UI-test source verifies:

  • ordinary launch enters live Telegram setup;
  • approved Browse shell in fixture mode;
  • rail navigation;
  • chat switching does not retain another chat's attachments;
  • operational settings can change;
  • disconnected connection presentation;
  • cached chat before Telegram pagination;
  • progressive setup states and credential help;
  • advanced filter controls;
  • Downloads empty-state navigation.

UI tests validate structure and interaction, not a real Telegram account.

Documentation gates

Documentation publication should additionally check:

  • every relative link resolves;
  • anchors and wiki navigation have no orphan pages;
  • no placeholder copy or personal path was introduced;
  • dependency pins match committed metadata;
  • legal and privacy claims match code, entitlements, and network boundaries;
  • GitHub renders representative Markdown and Mermaid successfully.

What automation does not prove

A green build does not prove:

  • Telegram accepts real credentials;
  • a real FLAC sent as music retains its filename;
  • exhaustive pagination completes for a very large chat;
  • a disconnected network recovers gracefully;
  • an external volume behaves correctly;
  • VoiceOver reading order is usable;
  • signed distribution, notarization, or App Store review succeeds.

Those are manual release gates, not bugs to hide under a green checkmark.

Clone this wiki locally