Skip to main content
Momentic tests the native build of a React Native app. The pipeline is: produce an APK (Android) or simulator .app (iOS), upload it to a channel/tag, run momentic-mobile.

Produce a testable build

The Gradle project lives in android/:
For a faster debug build during authoring, ./gradlew assembleDebug works too: debug builds are debuggable=true and need no extra configuration.

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
In the editor, pick the channel/tag and a Momentic Region for a remote emulator or simulator, or Local for a local instance.

React Native pitfalls

  • Hermes and release-mode JS. The tested build is the compiled native app. JS-only changes (a moved button, a renamed screen) require a rebuild for the installed binary to reflect them.
  • Metro is optional. A release APK embeds the JS bundle, so it needs no Metro server. A dev build that looks for Metro will hang at the loading screen if Metro is not running; test release/preview builds unless you specifically want dev-server coverage.
  • testID becomes an accessibility identifier. React Native testID props surface to the native layer, so tap: the element with testID login works. But prefer describing what the user sees; targets survive refactors that change IDs.
  • Third-party native modules (maps, cameras, Bluetooth) behave as they do on any emulator. Simulated camera/microphone input is available through setCamera/setMicrophone where supported; some hardware-backed features have no emulator equivalent.
  • WebView content on Android needs WebView.setWebContentsDebuggingEnabled(true).
  • Deep links open via an appium step (mobile: deepLink).

In CI

.github/workflows/mobile.yml
--channel/--tag on run select the asset this job just uploaded; tests’ defaultChannel/defaultTag only apply when the flags are absent. iOS builds need a macOS runner (runs-on: macos-latest) and an xcodebuild build-for-testing step before upload.