feat(android-tests): interactive UI on direct launch, headless under instrumentation#478
Merged
wmathurin merged 2 commits intoJul 7, 2026
Merged
Conversation
…under instrumentation Direct launches (Android Studio, icon tap, adb without extras) now mount TestApp so individual tests can be tapped and run one at a time. connectedAndroidTest still mounts HeadlessTestApp: the test APK and app APK share a classloader under instrumentation, so InstrumentationRegistry is resolvable; ClassNotFoundException on a direct launch routes to interactive mode instead.
|
||||||||||||||
…try; raise MobileSync timeout The xcscheme had SalesforceReactTests listed twice — once with parallelizable=YES and once without. Xcode ran both, spawning two simulator clones that hit the same org concurrently and raced each other's mutations (creates, deletes, syncs), causing widespread non-deterministic failures on CI. Also raises ReactMobileSyncTests.testTimeoutSeconds from 60s to 120s; testCleanResyncGhosts was timing out at 111s on CI.
brandonpage
approved these changes
Jul 7, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
After #473 landed, the test app always mounts
HeadlessTestApp— a blank screen that just runs the suite and emits logcat sentinels. There was no way to run a single test manually without editing code and rebuilding.Fix
MainActivity.getMainComponentName()now detects whether it is running under Android instrumentation by attempting to resolveInstrumentationRegistryvia reflection:connectedAndroidTest: the test APK and app APK share a classloader, soInstrumentationRegistryis resolvable → mountsHeadlessTestApp(headless CI behaviour unchanged).adb shell am startwithout extras): the test runner is absent →ClassNotFoundException→ mountsTestApp(the interactive per-test UI).No extras or flags required. No change to the CI workflow or
BaseReactNativeTest.Validation
connectedAndroidTest(full suite): 35/35 pass, same as beforeadb shell am start: shows the interactiveTestAppUI with per-test Run buttons