ORIX Maps — testing
How the application is tested, how to run each suite, what the last run gave, and what no suite verifies.
The modules under Packages/ and Infrastructure/ have their own tests (scripts/build.sh packages); this document
covers the application, Apps/ORIXMaps.
Layers
| Layer | Where | What it covers |
|---|---|---|
| Package tests | Packages/*/Tests, swift test on macOS |
Geodesy, formats, search, routing, navigation, package store, tracks, places… Not described here. |
| Unit tests of the application | Apps/ORIXMaps/Tests/ORIXMapsTests (Swift Testing, hosted by the app on the simulator) |
Application logic the packages do not have: launch arguments, settings, theme store, style coordination, trip coverage, messages of the downloads screen, library import/export, track recording, route planning and guidance on the real Montréal graph, composition root, compiled French resources. |
| UI tests | Apps/ORIXMaps/Tests/ORIXMapsUITests (XCUITest on the simulator) |
The flows end to end, against the real distribution API on loopback and the real 222 MB region; accessibility audits; the screenshot tours. |
| Localization check | scripts/localize.py --check |
Every string the compiler extracts has a French translation; no translation is orphaned; format specifiers agree. |
Commands
scripts/build.sh debug # build for the simulator "ORIXMaps iPhone"
scripts/build.sh test # unit tests (ORIXMapsTests)
scripts/localize.py # build, extract strings, merge scripts/translations-fr.json, write the catalogs; fails on a missing or orphaned translation
scripts/localize.py --check --no-build # verify only
scripts/uitest.sh # every UI test on "ORIXMaps iPhone": light phase, dark phase, position-refused phase
scripts/uitest.sh ipad # iPad suite on "ORIXMaps iPad" (iPad Pro 11-inch): layout, main flows, screenshot tours
scripts/uitest.sh iphone -only-testing:ORIXMapsUITests/SearchTests # a selection
ORIX_APPEARANCE=dark scripts/uitest.sh iphone -only-testing:ORIXMapsUITests/AccessibilityTests/testAuditDark
scripts/uitest.sh iphone --screenshots # same as the first, and copies the captures named docs-<name> to docs/screenshots/
scripts/build.sh uitest [xcodebuild options] # the bare xcodebuild step, without servers, permissions or phasesscripts/uitest.sh does the preparation the UI tests need:
- checks the development distribution
data/dev-dist(git-ignored; regionca-qc-montreal, signed with the development key that DEBUG builds trust); - uses the map server already listening on port 8765 or starts one
(
python3 Infrastructure/distribution/dev-server.py data/dev-dist 8765), starts a throttled one on 8766 (--throttle 6000000, the region then takes about 37 s) and requires port 8799 to be free (it plays the stopped server). Servers it started are stopped at the end, by PID; - creates the simulator on first use, waits for
simctl bootstatus, sets the text size to the default, the position to downtown Montréal (simctl location <udid> set 45.5017,-73.5673); - runs three phases, one
xcodebuildat a time and never in parallel:- light appearance, position allowed (
simctl privacy <udid> grant location ai.spboucher.orix.maps); - dark appearance (
simctl ui <udid> appearance dark):AccessibilityTests/testAuditDarkand the dark screenshot tours.XCUIDevice.shared.appearancehas no effect on this simulator runtime, hence a phase; - position refused (
simctl privacy <udid> revoke location …):LocationDeniedTests;
- light appearance, position allowed (
- exports the attachments of each result bundle (
build/results/<name>.xcresult) tobuild/results/<name>-attachments/.
Results and logs: build/results/, build/logs/uitest-*.log. Accessibility findings are the log lines starting with
A11Y.
Launch arguments
Passed as -Name value. Those marked DEBUG exist in debug builds only. They never change behaviour in normal use.
| Argument | Effect |
|---|---|
-ORIXUITest YES |
Isolated preferences domain and data in a temporary directory. |
-ORIXReset YES |
Erase preferences and data before starting. |
-ORIXSkipOnboarding YES |
Start on the map. |
-ORIXCatalogURL <url> |
Map catalog to use, e.g. http://127.0.0.1:8765/maps/v1/. |
-ORIXAutoDownload <region> (DEBUG) |
Download and install a region right after launch. |
-ORIXCamera lat,lon,zoom[,bearing,pitch] |
Initial viewpoint. |
-ORIXTheme <id> |
Map theme, e.g. orix.midnight (turns the automatic night theme off). |
-ORIXRouteFrom lat,lon -ORIXRouteTo lat,lon (DEBUG) |
Plan a route once the region is ready (waits up to a minute). Without From, from the position. |
-ORIXMode walk|bike (DEBUG) |
Travel mode of that route. |
-ORIXSimulate YES (DEBUG) |
Start simulated guidance on that route. |
-ORIXSearch <text> (DEBUG) |
Run a search after launch (results are drawn on the map; the field stays empty). |
-ORIXScreen <name> (DEBUG, added for tests) |
Open a screen after launch: layers, downloads, collections, tracks, settings, compass, studio, explorer, about, planner, or measure. |
-ORIXImportTheme valid|invalid (DEBUG, added for tests) |
When Map Studio opens, hand its import code a generated theme file, as if picked in Files. The system document picker cannot be driven reliably by UI tests. |
-ORIXDevRegion <path.pmtiles> (DEBUG) |
Draw a raw tile archive as a region, without installation. |
-ORIXPosition lat,lon, -ORIXDevRegionDir <dir> |
Parsed, not used by the application. The UI tests set the position with XCUIDevice.shared.location. |
System arguments used by the tests: -AppleLanguages (fr) -AppleLocale fr_CA (or (en), en_CA) and
-UIPreferredContentSizeCategoryName UICTContentSizeCategoryAccessibilityXXXL. The simulator "ORIXMaps iPhone" is
itself set to French (Canada): the tests always pass the language explicitly.
Unit tests (ORIXMapsTests)
| Suite | Covers |
|---|---|
LaunchOptionsTests |
Every argument, malformed coordinates and cameras. |
AppSettingsTests |
Defaults of a fresh install, persistence of every value, unknown stored values, last viewpoint, label language rules, units. |
ThemeStoreTests |
Save, duplicate, delete, reload from disk, export, import (valid, not a theme, newer version, oversized, missing); built-in themes are never replaced or deleted. |
StyleCoordinatorTests |
World labels flagged inside drawn regions and only there, one cached file per region set, a region inside another is not drawn twice, style sources, no reload for an unchanged request. |
TripCoverageTests |
Coverage share, regions on the way, catalog regions offered for the uncovered part, development region ignored, degenerate lines. The computation was extracted from PlannerScreen into TripCoverage. |
RegionsModelMessageTests |
The sentence shown for the main package, store, download and catalog errors; an unreachable catalog; import of a file that is not a package. |
LibraryModelTests |
Temporary database: default collection, save/find/delete, pins drawn, export then import in GPX, GeoJSON and KML, backup and restore, the reason given for each import failure, history on/off/erase. |
TracksModelTests |
Recording driven by a SimulatedLocationProvider: distance, pause/resume segments, fewer than two points, imprecise fixes, interrupted recording after relaunch (continue, save, discard), export/import in three formats, rename, delete. |
DirectionsModelTests |
Failures without a graph or with a damaged one; on data/build/routing/montreal.orixgraph (skipped cleanly when absent): car route downtown → Olympic Stadium, alternatives, modes, a point outside the region, from the position with and without a fix, route computed when the position arrives, a device that does not move, stops, simulated guidance to arrival, and no permission request after a simulated drive. |
AppModelTests |
Launch arguments on the composition root, place selection, Reduce Motion (camera moves take no time), automatic night theme, dropped pin, erase history. |
LocalizationTests |
The compiled fr.lproj: common terms, French and English plural forms, reordered arguments, percent sign, the location purpose string. |
UI tests (ORIXMapsUITests)
Every test launches the application with -ORIXUITest YES -ORIXReset YES (a relaunch inside a test keeps the data)
and is independent of the others.
| Class | Scenarios |
|---|---|
OnboardingTests |
Three pages then the map, no permission prompt, not shown again after relaunch; skip. |
DownloadsTests |
No region: the map appears and the empty state explains it; catalog → download of the real package → verification → installed → region usable; progress, pause and resume on the throttled server; cancel; stopped server shows the offline message; delete returns to the empty state; force-quit during a download, relaunch, resume offered and completed. |
SearchTests |
By name; suggestions while typing; address with a house number; unknown house number reported as "street only"; category chip; coordinates with no region installed; text with no region explains why; nothing found. |
PlacesTests |
Place card → save → listed in Collections → edit the note → remove; long press drops a pin with coordinates and the nearest address; long press with no region gives coordinates only; new collection and backup. |
DirectionsTests |
Route in each mode, alternatives selectable, steps list; from the simulated position to a searched place; simulated guidance to arrival ("You have arrived"); ending guidance early, mute/unmute; simulation started from the planner; a point outside the region; no region. |
LocationDeniedTests (phase 3) |
Location button, directions from "My position", compass, track recording, real guidance: each shows its explanation, nothing crashes, no system prompt; Privacy shows "Refused". |
ThemeTests |
Every built-in theme renders (a capture of each, all different); terrain and transit notices; Map Studio duplicate, rename, edit, delete; import of an invalid theme file shows the error; import of a valid one adds it. |
ToolsTests |
Measure: points, distance, closed shape and area, undo, clear; track: record while the simulated position moves, pause, stop, statistics, GPX export; compass coordinates; Explorer; trip planner coverage of a planned route. |
SettingsTests |
Coordinate format changes the place card title (decimal, DMS, UTM); units change route and result distances; settings survive a relaunch; erasing history empties recents; history off records nothing; About lists the sources and the installed map. |
AccessibilityTests |
performAccessibilityAudit() on onboarding, map, search results, place card, downloads, collections, settings, directions, guidance — light, dark (phase 2) and largest text size; labels of the map controls and of every button. |
PadTests (uitest.sh ipad) |
Side panel instead of a sheet, landscape and portrait; download → search → place → save; directions, modes, simulated guidance; long press and measure; sheets for themes and settings. |
ScreenshotTour |
Walks 34 screens in English and French, light and dark (dark in phase 2). |
Units and the place card: the place card shows no distance, so the units setting is verified on the route cards and on the search results; the coordinate format is verified on the place card.
Latest results
Run of 2026-11-25, Xcode 27.2, simulator runtime iOS 26.5 (23F77), on the tree as delivered.
| Suite | Simulator | Passed | Failed | Skipped | Notes |
|---|---|---|---|---|---|
Localization (scripts/localize.py) |
— | 456 strings + 2 Info.plist strings translated | 0 missing, 0 orphaned | — | 5 keys with plural forms |
Unit tests (scripts/build.sh test) |
ORIXMaps iPhone (iPhone 17 Pro) | 97 tests in 11 suites | 0 | 0 | the tests that need data/build/routing/montreal.orixgraph ran (none skipped) |
| UI tests, phase 1 (light, position allowed) | ORIXMaps iPhone | 49 | 0 | 3 | the 3 skipped are the dark tests, which run in phase 2 |
| UI tests, phase 2 (dark) | ORIXMaps iPhone | 2 (+1 on a second run) | 1 on the first run | 0 | the two dark tours passed; the dark audit failed once, then passed alone — see the note below |
| UI tests, phase 3 (position refused) | ORIXMaps iPhone | 6 | 0 | 0 | |
iPad suite, light (scripts/uitest.sh ipad) |
ORIXMaps iPad (iPad Pro 11-inch (M5)) | 7 | 0 | 2 | PadTests and the two light tours; the 2 skipped are the dark tours |
| iPad suite, dark | ORIXMaps iPad | 2 | 0 | 0 | the two dark tours |
| Debug and Release builds | simulator | both succeed | 0 | — | no archive or device build was made here |
Notes on this run, as it happened:
- Phase 2 of the complete run gave 2 passed and 1 failed:
AccessibilityTests/testAuditDarkstopped with "Timed out while evaluating UI query" on its first query, right after the simulator restart that the dark appearance needs. The script now waits 20 s after that restart; the test was run again alone in the dark appearance and passed. The three phases have not been run again end to end since that change. - The iPad suite was run after the complete iPhone run, and after one more change to the application that only
concerns the iPad side panel (opaque background,
MapScreen.swift). The iPhone UI suite was not run again after that change; the unit tests and both builds were. - The whole iPhone suite takes about 45 minutes, the iPad suite about 25.
Accessibility
AccessibilityTests runs the system audit (all audit types) on nine screens in three configurations. Findings of the
last run, after the fixes listed below; none is left unclassified:
| Configuration | Findings | Text clipped | Contrast | Dynamic Type "partially unsupported" | Hit region |
|---|---|---|---|---|---|
| Light | 100 | 37 | 41 | 21 | 1 |
| Dark | 83 | 37 | 24 | 21 | 1 |
| Largest text size (AX5) | 28 | 16 | 7 | 5 | 0 |
Fixed because of the audit and of the captures at the largest size:
- Contrast: the light accent colour was 3.0:1 on white (text buttons, primary buttons); it is now
#007568(5.7:1). Buttons with white text use fixed fills (PrimaryFill,DangerFill) in both appearances: the bright accent of the dark appearance gave white text 1.9:1. Tertiary texts that carry information are now secondary. - Hit regions under 44 pt: "Skip", "Reverse", "Show on map", the clear button of the search field.
- Dynamic Type: the guidance distance used a fixed size; onboarding truncated its title and now wraps and scrolls; rows of buttons, the downloads rows and the route points stack or wrap at accessibility sizes; the guidance panel scrolls.
- Labels: decorative images hidden; pin symbols have spoken names in both languages; the location button says why it does nothing when the permission is refused.
Accepted, with the reason (the test repeats it for each finding in the log):
- Text clipped, default size (37) — false positive: SwiftUI reports text frames tighter than the line height of the font; every text is fully drawn on the captures kept with the results.
- Text clipped, largest size (16) — a real limitation, not a false positive: long titles, addresses and the search placeholder end with an ellipsis after two or three lines.
- Contrast on texts that are not buttons — not actionable from the application: secondary text on the system's translucent sheet material above the map, and system list headers. The audit samples the blurred map behind (it also flags primary text there). Checked by eye in light and dark; a contrast finding on a button fails the test.
- Dynamic Type "partially unsupported" — false positive for texts in system text styles, which scale on the captures; deliberate for the search bar, capped at the first accessibility size because the collapsed panel has a fixed height.
- Hit region, the onboarding page indicator — it is not a control.
Not fixed, in packages the application does not own:
- The map engine view exposes two controls of its own to assistive technologies: "Compass" (overlapping the layers
button) and "About this map" (26 pt).
ORIXMapRenderer. - Active map buttons draw a white icon on the bright dark-mode accent (
MapControlButton,ORIXDesignSystem). - Chips expose their decorative symbol as a separate image (
Chip,ORIXDesignSystem).
Screenshots
Real captures from the simulator, taken by ScreenshotTour and ThemeTests and copied by
scripts/uitest.sh --screenshots to docs/screenshots/. Names are <device>-<language>-<appearance>-<nn>-<screen>.png.
280 files.
| Set | Files | Captures |
|---|---|---|
ipad-en-dark-… |
34 | all 34 screens |
ipad-en-light-… |
34 | all 34 screens |
ipad-fr-dark-… |
34 | all 34 screens |
ipad-fr-light-… |
34 | all 34 screens |
iphone-en-dark-… |
34 | all 34 screens |
iphone-en-light-… |
34 | all 34 screens |
iphone-fr-dark-… |
34 | all 34 screens |
iphone-fr-light-… |
34 | all 34 screens |
iphone-theme-<theme>.png |
8 | each built-in theme on the same view: day, explorer, highcontrast, midnight, minimal, terrain, topographic, transit |
The 34 screens of a tour: 01-onboarding-1, 02-onboarding-2, 03-onboarding-3, 04-map-empty-state, 05-downloads-catalog, 06-downloads-installed, 07-map-region, 08-search-category, 09-search-results, 10-place-card, 11-save-place, 12-home-saved-and-recents, 13-search-nothing-found, 14-collections, 15-collection-detail, 16-layers-themes, 17-map-studio, 18-theme-editor, 19-theme-editor-colours, 20-tracks, 21-compass, 22-explorer, 23-settings, 24-settings-guidance, 25-privacy, 26-about, 27-measure, 28-track-recording, 29-track-statistics, 30-directions, 31-directions-steps, 32-trip-planner, 33-guidance, 34-guidance-arrived.
Defects seen on the captures and fixed are listed in the report of the work; what remains visible: at the largest text size some titles end with an ellipsis; in the theme captures the same viewpoint is used for all themes (downtown Montréal, zoom 14).
Not verified
Nothing below was exercised: all of it needs a physical device or a production service.
- Real GPS: accuracy, first fix, position filtering while moving, heading from the magnetometer (the simulator reports no heading: the compass screen was only seen in its "not available" state with coordinates).
- Background location with the screen locked (guidance and track recording), the background location indicator, and what iOS does to the application after a long time in the background.
- Speech: the voice, its language and volume, audio session behaviour with music or a call. The tests only check that guidance produces announcements and that mute/unmute changes the setting.
- Energy use, heat, 120 Hz rendering ("Smoother map motion"), memory under pressure on a small device.
- Airplane mode on hardware, a real network loss in the middle of a download (the tests use a stopped local server, a throttled one and a force-quit), cellular, captive portals.
- The production catalog (
www.orixlab.dev) and packages signed with the production key: every download test uses the development distribution and the development key. - The system document picker (import of a map file, a theme, GPX/GeoJSON/KML from Files) and the share sheet: the import code is exercised by unit tests and by the theme fixture; the pickers themselves are not driven.
- Opening an
.orixmapor.orixthemefile from another application. - VoiceOver itself (speech output, rotor, focus order): the tests check labels, values, traits and the audit.
- Reduce Motion on screen: verified by unit test (camera moves take no time) and by reading the code; not observed with the system setting turned on.
- Localized names of the document types in Files (
UTTypeDescription,CFBundleTypeName): not translated, not checked. - iPhone sizes other than iPhone 17 Pro, iPad sizes other than iPad Pro 11-inch, Split View and Slide Over, landscape on iPhone.
- The stale-catalog notice ("Offline: this list was last updated on…"): needs the server to disappear between two launches of the same test; not automated.