Skip to main content
Momentic tests the native build of a Flutter app. The pipeline is: produce an APK (Android) or simulator .app (iOS), upload it to a channel/tag, and run momentic-mobile. Momentic drives the compiled app through the platform driver rather than Flutter-specific test APIs.

Produce a testable build

flutter build apk --debug also works for local iteration.

Upload and run

Add the CLI as a dev dependency so the lockfile pins the version in CI:
Then upload and run:
smoke.test.yaml

Flutter pitfalls

  • Semantics help identify controls. Momentic uses screenshots and the native accessibility tree. Flutter semantics expose named controls to that tree. Most Material and Cupertino widgets provide semantics; custom CustomPainter content may need Semantics wrappers. If a visible control cannot be resolved, inspect its semantics along with the screenshot.
  • Key values do not reach the accessibility tree. ValueKey('login-button') is invisible to Momentic; keys exist for Flutter’s own finder APIs. For a stable hook, wrap the widget in Semantics(label:) or give it a tooltip. Prefer natural-language targets that describe the control and its purpose.
  • Splash and async init. A Flutter app often shows a splash while main() awaits. Rather than a fixed wait, assert on the first application screen: assert: The home screen is visible with a timeout.
  • Build-time configuration. Pass test configuration through --dart-define when building. Changes made only in a running DevTools session do not update the uploaded artifact.
  • Impeller vs. Skia rendering does not change what the accessibility tree exposes; either engine works.
  • WebView content on Android needs WebView.setWebContentsDebuggingEnabled(true).

In CI

.github/workflows/mobile.yml
--channel/--tag on run select the asset this job just uploaded. iOS builds need runs-on: macos-latest with flutter build ios --simulator before the upload step.