feat: mobile UAT test enablement - Android automation server + host abstraction - #935
Open
dangershony wants to merge 1 commit into
Open
feat: mobile UAT test enablement - Android automation server + host abstraction#935dangershony wants to merge 1 commit into
dangershony wants to merge 1 commit into
Conversation
…bstraction Lifetime-agnostic automation (Item 1): - AutomationRoot.cs: resolves visual root via TopLevel on all platforms - AutomationFlows: Window -> TopLevel for all flow helpers (~45 signatures) - NavigateToAsync: detects mobile layout, drives ShellViewModel directly - App.axaml.cs: captures App.MainView for Android/iOS/WASM Config injection (Item 3): - DebugTestConfig.cs: reads debug.angor.* system properties via JNI, maps to ANGOR_* env vars before DI container builds - ProfileNameResolver: falls back to ANGOR_PROFILE env var Security (Item 5): - AutomationServer: requires ANGOR_TEST_API=1 on all platforms (was unconditional on Android), binds loopback-only Host abstraction (Item 2): - ITestHost interface extracted from TestProcessHost - AndroidTestHost: connects to already-running Android automation server - TestHostFactory: ANGOR_UAT_HOST=android switches all tests to Android - All 9 test files updated to use TestHostFactory.LaunchAsync - start-uat.ps1: setup script for Android device Verified: CreateProjectTest passes on desktop after refactor. Smoke-tested on Samsung device: health + navigation all sections.
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.
Summary
Enables running the existing UAT test suite against a USB-connected Android device, driven over adb and the in-app automation server.
Status: Work in Progress
The core infrastructure is in place and smoke-tested, but Android UAT is not fully stable yet. Known issues:
am force-stop, requiring adb server restart. Thestart-uat.ps1script handles this withwait-for-device, but it is not 100% reliable.-p:EmbedAssembliesIntoApk=true.Full end-to-end CreateProjectTest has not been run successfully on Android yet, only smoke-level validation (health check + section navigation).
What is implemented
Item 1 - Lifetime-agnostic window resolution:
AutomationRoot.cs: resolves visual root viaTopLevelon all platformsWindowtoTopLevel(~45 call sites)NavigateToAsync: detects missingDesktopSidebar, drivesShellViewModeldirectly on mobileItem 2 - AndroidTestHost:
/healthon a pre-configured portstart-uat.ps1script handles device setup (setprop, launch, forward)Item 3 - Config injection:
DebugTestConfig.cs(#if DEBUG): readsdebug.angor.*system properties via Android JNI, maps toANGOR_*env vars before DI buildsProfileNameResolver: falls back toANGOR_PROFILEenv varItem 5 - Security gate:
ANGOR_TEST_API=1(was unconditional in Debug builds)IPAddress.Any)Host abstraction:
ITestHostinterface +TestHostFactorysetANGOR_UAT_HOST=androidto switch all testsTestHostFactory.LaunchAsyncVerification
How to use (Android)