Skip to content

test(a11y): Stop two Android accessibility tests racing their setup - #26000

Merged
MartinZikmund merged 3 commits into
unoplatform:masterfrom
ramezgerges:dev/rara/android-a11y-test-races
Nov 5, 2026
Merged

MartinZikmund merged 3 commits into
unoplatform:masterfrom
ramezgerges:dev/rara/android-a11y-test-races

Conversation

@ramezgerges

@ramezgerges ramezgerges commented Nov 3, 2026 •

Copy link
Copy Markdown
Contributor

GitHub Issue: part of #9080 (flaky tests roundup)

PR Type:

🏗️ Build or CI related changes

What changed? 🚀

Two Android accessibility runtime tests failed intermittently on the Android Skia lanes (both renderers). Test-only changes.

Given_MobileMultiWindowAccessibility.When_Primary_Root_Changes_Then_Event_Is_Routed_To_That_Root (10 of the last 30 master builds)

Assert.IsTrue failed. 'condition' expression: 'GetAndClearEvents(root).Any(record => record.Kind is AccessibilityNativeEventKind.StructureChanged or AccessibilityNativeEventKind.NodeInvalidated)'

It read the records right after WaitForIdle. The Android adapter records most events from a synchronous main-looper message that the view system's sync barriers can hold back, while the dispatcher's asynchronous messages skip them, so WaitForIdle can return before the record exists. 8517508 fixed the same race in Given_MobileAccessibilityEvents_Android and Given_MobileAccessibilityLifecycle_US7 (which have not failed since); this test lives in another class and kept the old pattern. It now polls for the record, with the same 5 s budget.

Given_SkiaAndroidAccessibilityNode.When_Virtual_Peers_Share_An_Owner_Then_They_Keep_Distinct_Ids_And_Actions (4 builds)

Assert.AreEqual failed. Expected:<1103>. Actual:<1102>. 'expected' expression: 'firstId', 'actual' expression: 'AccessibilityPeerHelper.AndroidAccessibilityHitTestAccessor?.Invoke(...)'

The native hit test (UnoExploreByTouchHelper.GetVirtualViewAt) starts at the XAML element under the point and walks up to the first element with an accessibility node, checking that element's virtual peers on the way. The test's host is a Grid without a background, so it is not hit-testable. A diagnostic added to the assertion (kept in the test) showed the miss on CI: the elements under the point were the runner's Frame, ContentPresenter, ContentPresenter, and the hit returned the runner's content presenter node (android.view.ViewGroup @0,80,1280,688) before ever reaching the host's peers. On the local emulator nothing accessible sat above the host, so the fallback scan found the peers and the test passed.

  • The host now has a transparent background, so the walk starts at the host and finds its peers.
  • The peers' bounds and the hit points now follow the host (TransformToVisual(null)) instead of fixed window coordinates near the top-left.
  • On a miss, the assertion reports the XAML elements and accessibility nodes under the point, the open popups and the bridge's tree summary.

Validation

On the Android emulator (API 34), retries off:

  • When_Primary_Root_Changes_Then_Event_Is_Routed_To_That_Root: master failed within 20 iterations; with this change, 20/20 pass.
  • When_Virtual_Peers_Share_An_Owner_Then_They_Keep_Distinct_Ids_And_Actions: 20/20 pass with this change. Its failure did not reproduce locally (nor with the five-test sequence of the failing CI shard), so the CI Android lanes are the real check for this one. An earlier version of this PR only moved the hit points; CI then hit the runner's content presenter (node 12), which the diagnostic identified.
  • Given_SkiaAndroidAccessibilityNode, Given_MobileMultiWindowAccessibility and Given_MobileAccessibilityEvents_Android: 64/65 pass. The failure, When_Overlapping_Elements_Are_HitTested_Then_Highest_ZIndex_Wins, is untouched and fails the same way on master locally; it does not fail on CI.

PR Checklist ✅

🤖 Generated with Claude Code

When_Primary_Root_Changes_Then_Event_Is_Routed_To_That_Root read the
records right after WaitForIdle, which can return before the Android
adapter's main-looper message records the event: it now polls, as
8517508 made its siblings do.

When_Virtual_Peers_Share_An_Owner_Then_They_Keep_Distinct_Ids_And_Actions
gave its peers fixed window bounds and hit-tested fixed window points,
near the top-left, over the test runner's own nodes rather than the
host. The peers' bounds and the hit points now follow the host.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
@github-actions github-actions Bot added the area/skia ✏️ Categorizes an issue or PR as relevant to Skia label Nov 3, 2026
@unodevops

Copy link
Copy Markdown
Contributor

🤖 Your WebAssembly Sample App stage site is ready! Visit it here:

@nventive-devops

Copy link
Copy Markdown
Contributor

The build 243430 found UI Test snapshots differences: skia-linux-screenshots: 2458, skia-windows-screenshots: 2458

Details
  • skia-linux-screenshots: 2458 changed over 2492

    🚨🚨 Comparison Details (first 20) 🚨🚨
    • Accessibility_ScreenReader.png-dark
    • AnimatedBackVisualSourceSamplePage.png-dark
    • AndroidWindowInsets.png
    • AndroidWindowInsets.png-dark
    • AppBarButtonWithIconTest.png
    • AppBarToggleButtonTest.png
    • AnimatedVisualsTestbedPage.png
    • AnimatedVisualsTestbedPage.png-dark
    • ApplicationViewMode.png-dark
    • ApplicationViewSpanningRectsPage.png-dark
    • Application_DispatcherShutdownMode.png-dark
    • ApplicationViewSizing.png
    • AppWindowClosing.png-dark
    • AppWindowFeatures.png
    • AppWindowTitleBar Properties.png-dark
    • AppWindowPositionAndSize.png-dark
    • AppWindowPresenters.png-dark
    • AppWindowTitleBar Properties.png
    • Arrange_Performance01.png
    • AppXamlDefinedResources.png
  • skia-windows-screenshots: 2458 changed over 2492

    🚨🚨 Comparison Details (first 20) 🚨🚨
    • AndroidWindowInsets.png-dark
    • AppBarButtonTest.png
    • AppBar_KeyBoard.png-dark
    • ApplicationViewSpanningRectsPage.png-dark
    • AppWindowFeatures.png
    • AppXamlDefinedResources.png-dark
    • Attributed_text_FontSize_Changing.png-dark
    • Attributed_text_Supserscript.png
    • AutoBorderStretchwithrightmargin.png-dark
    • AutoBorderStretchwithrightmargin.png
    • AutomationProperties_StructureAndProps.png-dark
    • AutomationProperties_StructureAndProps.png
    • BackGesture.png-dark
    • BackGesture.png
    • Basics Pivot Test.png-dark
    • Basics Pivot Test.png
    • Battery.png-dark
    • Battery.png
    • BezierSegment.png-dark
    • BezierSegment.png

The test still misses on CI, returning another node, and passes on a
local emulator, so its assertions now report the XAML elements and
accessibility nodes under the point, the open popups and the bridge's
tree summary.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
@unodevops

Copy link
Copy Markdown
Contributor

🤖 Your WebAssembly Sample App stage site is ready! Visit it here:

The diagnostic showed the miss on CI: the XAML elements under the point
were the runner's Frame and content presenters, not the host, which has
no background. The native hit test walks up from the element it hits, so
it returned the runner's content presenter node before reaching the
host's peers.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
@unodevops

Copy link
Copy Markdown
Contributor

🤖 Your WebAssembly Sample App stage site is ready! Visit it here:

@nventive-devops

Copy link
Copy Markdown
Contributor

The build 243626 found UI Test snapshots differences: skia-linux-screenshots: 2458, skia-windows-screenshots: 2458

Details
  • skia-linux-screenshots: 2458 changed over 2494

    🚨🚨 Comparison Details (first 20) 🚨🚨
    • AndroidWindowInsets.png
    • AppBarButtonWithIconTest.png
    • ApplicationViewMode.png-dark
    • AppWindowClosing.png-dark
    • AppWindowPresenters.png
    • Arrange_Performance01.png-dark
    • Attributed_text_Supserscript.png
    • AutoBorderStretchwithleftmargin.png
    • AutomationProperties_AutomationId.png-dark
    • AutomationProperties_AutomationId.png
    • AutoSizedTopLeft.png-dark
    • AutoSizedTopLeft.png
    • BadgeNotificationTests.png-dark
    • BadgeNotificationTests.png
    • Basics_Automated.png-dark
    • Basics_Automated.png
    • BenchmarkDotNet.png-dark
    • BenchmarkDotNet.png
    • BitmapImage_vs_SvgImageSource.png-dark
    • BitmapImage_vs_SvgImageSource.png
  • skia-windows-screenshots: 2458 changed over 2494

    🚨🚨 Comparison Details (first 20) 🚨🚨
    • AndroidWindowInsets.png-dark
    • AppBarButtonTest.png
    • ApplicationViewMode.png-dark
    • AppWindowClosing.png-dark
    • AppWindowPresenters.png-dark
    • Arrange_Performance01.png-dark
    • Attributed_text_Supserscript.png-dark
    • AutoBorderStretchwithrightmargin.png-dark
    • AutoBorderStretchwithtopmargin.png-dark
    • AutoBorderStretchwithtopmargin.png
    • AutoSizedPathCentered.png-dark
    • AutoSizedPathCentered.png
    • AutoSuggestBox_Icons.png-dark
    • AutoSuggestBox_Icons.png
    • BasicAutoSuggestBox.png-dark
    • BasicAutoSuggestBox.png
    • BasicThemeResources.png-dark
    • BasicThemeResources.png
    • BitmapIcon_Foreground.png-dark
    • BitmapIcon_Foreground.png

@ramezgerges

Copy link
Copy Markdown
Contributor Author

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).

@unodevops

Copy link
Copy Markdown
Contributor

🤖 Your WebAssembly Sample App stage site is ready! Visit it here:

@nventive-devops

Copy link
Copy Markdown
Contributor

The build 243770 found UI Test snapshots differences: skia-linux-screenshots: 2458, skia-windows-screenshots: 2458

Details
  • skia-linux-screenshots: 2458 changed over 2494

    🚨🚨 Comparison Details (first 20) 🚨🚨
    • AnimatedIconPage.png
    • AnimatedVisualsTestbedPage.png-dark
    • Accessibility_ScreenReader.png
    • ApplicationViewSpanningRectsPage.png-dark
    • AppBarButtonWithIconTest.png
    • AppWindowFeatures.png
    • ApplicationViewMode.png-dark
    • AppXamlDefinedResources.png
    • AppWindowClosing.png-dark
    • Attributed_text_Simple.png
    • AppWindowPresenters.png-dark
    • AuthenticationBroker_Demo.png
    • ArcSegment.png
    • AutoBorderStretchwithtopmargin.png-dark
    • AuthenticationBroker_Cancel.png
    • AutomationProperties_Relations.png-dark
    • AutomationPropertiesExtensions_Role.png
    • AutomationProperties_Relations.png
    • AutoSuggestBox_BitmapIcon.png-dark
    • AutoSuggestBox_SoftKeboard.png-dark
  • skia-windows-screenshots: 2458 changed over 2494

    🚨🚨 Comparison Details (first 20) 🚨🚨
    • Accessibility_ScreenReader.png-dark
    • AppBarButtonWithIconTest.png-dark
    • ApplicationViewMode.png
    • Application_DispatcherShutdownMode.png
    • AppWindowTitleBar Properties.png
    • Attributed_text_FontSize_Changing.png
    • AutoBorderStretchwithleftmargin.png
    • AutomationProperties_AutomationId.png
    • AutomationProperties_StructureAndProps.png
    • AutoSizedPathCentered.png-dark
    • BackGesture.png-dark
    • BackGesture.png
    • BasicEnability.png-dark
    • BasicEnability.png
    • BezierSegment.png-dark
    • BezierSegment.png
    • BitmapIcon_Monochromatic.png-dark
    • BitmapIcon_Monochromatic.png
    • BorderCenteredwithmargins.png-dark
    • BorderCenteredwithmargins.png

@mergify

mergify Bot commented Nov 5, 2026 •

Copy link
Copy Markdown
Contributor

This pull request does not currently match the merge queue conditions, so it cannot be queued from here. The box comes back if it matches again.

@MartinZikmund
MartinZikmund merged commit 15e2745 into unoplatform:master Nov 5, 2026
48 checks passed
@ramezgerges
ramezgerges deleted the dev/rara/android-a11y-test-races branch November 5, 2026 14:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/skia ✏️ Categorizes an issue or PR as relevant to Skia

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants