Skip to content

Mobile Simulator & Test Orchestrator ​

Developing mobile applications traditionally requires running heavy simulators (Xcode iOS Simulator or Android Studio Emulator) consuming gigabytes of system memory.

Strata provides a dogfooded, lightweight native device simulator (strata_sim) and headless automated test orchestrator (strata_mobile_test) built directly in pure Rust.


Dogfooded Native Simulator (strata_sim) ​

Launch the simulator using the Strata CLI:

bash
strata sim --device "iphone-15-pro"

Simulator Capabilities ​

  1. Accurate Hardware Bezels & Cutouts:
    • iPhone Dynamic Island and interactive camera notch cutouts.
    • Android punch-hole cameras and gesture navigation bars.
    • Real-time Safe Area Inset simulation (env(safe-area-inset-top)).
  2. Multi-Touch & Gesture Synthesis:
    • Left-click drag simulates single finger touch pan and swipe gestures.
    • Alt + Mouse scroll simulates multi-finger pinch-to-zoom and rotational gestures.
    • Physics-based momentum scrolling matching iOS and Android scroll curves.
  3. Hardware Sensor Injection:
    • Gyroscope & Accelerometer tilt simulation via mouse dragging.
    • Battery level and thermal state mocking via simulator command palette.
    • Network status toggles (WiFi, 5G, Offline flight mode).
  4. Orientation Toggles: Instant seamless rotation between Portrait and Landscape modes (Cmd+R / Ctrl+R).

Supported Device Profiles ​

Device ProfileResolutionScale FactorSafe Area TopSafe Area Bottom
iPhone 15 Pro393 x 852 pt3.0x59 pt34 pt
iPhone 15 Pro Max430 x 932 pt3.0x59 pt34 pt
Google Pixel 8 Pro412 x 892 pt2.6x48 pt24 pt
Samsung Galaxy S24360 x 780 pt3.0x40 pt20 pt
iPad Pro 11-inch834 x 1194 pt2.0x24 pt20 pt

Automated Mobile Testing (strata_mobile_test) ​

strata_mobile_test provides a headless, programmable driver for executing end-to-end regression tests across mobile device form factors without requiring physical devices or emulators:

rust
#[cfg(test)]
mod tests {
    use strata_mobile_test::prelude::*;

    #[test]
    fn test_mobile_navigation_flow() {
        let mut session = MobileTestSession::new(DeviceProfile::IPhone15Pro);
        session.load_app(MyApp);

        // Verify initial render within safe areas
        assert!(session.find_by_text("Cluster Telemetry").is_visible());

        // Simulate touch tap on tab button
        session.tap_element("#nav-workloads");

        // Verify state update and layout reflow
        assert_eq!(session.query_value("#active-tab-title"), "Workloads");

        // Capture deterministic golden screenshot for pixel regression verification
        session.assert_screenshot_matches("golden/mobile_workloads.png");
    }
}

Zero Chromium. Pure Rust. Native 120 FPS.