Skip to content

uno-testing: verify through the accessibility tree first, including Release builds without the App MCP #160

Closed

Description

@kazo0

Status

Delivered by #162. The FieldCheck re-run (last task) is queued separately in unoplatform/private (tools/skill-ab) and does not keep this issue open.

Summary

uno-testing only covers verification through the Uno App MCP, which reaches Debug builds through the DevServer. When an agent has to verify a Release build, or the App MCP is not connected, the skill gives no guidance, and agents fall back to coordinate clicks and reading screenshots. That is slow and expensive: every screenshot read back into the model stays in its context and is re-read on every later call.

Make accessibility first the rule on every verification path: find controls in the element tree, act on them through their automation name or ID, assert on the state the tree reports, and use screenshots only for visual assertions and evidence.

Evidence

From an internal benchmark run (FieldCheck: a six-screen app built to a frozen spec and verified on Android and on Windows through the Desktop head; harness in unoplatform/private, tools/skill-ab). The agent loaded uno-testing, used the App MCP on Debug builds, then verified the Release builds with its own Python drivers: window capture and coordinate clicks on Windows, adb shell input tap in dp on Android. It never queried an element tree.

  • 129 model calls from the start of verification to the end of the core run, against 186 for everything before it.
  • 61 screenshots read back into the model during verification. Screenshots added about 150k tokens of context before the end of the core run, and every later call re-read them.
  • A comparable session in the same environment that queried the accessibility tree instead (uiautomator dump on Android, Windows UI Automation through Python's uiautomation package) needed 70 calls and 21 screenshots for the same verification.

Verification was the largest single reason that run cost more than it needed to.

What Uno exposes

The automation peers docs say that on all Skia targets the accessibility tree is built from automation peers and routed to each platform's native API. Checked in #162 on a Release build of a recommended-preset app (Uno.Sdk 6.8, Skia renderer, IsUiAutomationMappingEnabled not set):

Windows (net10.0-desktop), UI Automation Android (Skia), uiautomator dump
AutomationProperties.Name (or content text) Name content-desc
AutomationProperties.AutomationId AutomationId (x:Name when no ID is set) not exposed, also with IsUiAutomationMappingEnabled=true (unoplatform/uno#23934)

Proposal

  • A critical rule in SKILL.md: locate, act and assert through the element tree; a screenshot is a visual check or evidence, never the way to find a control or confirm its state. Keep the addition short, since SKILL.md is loaded on every invocation.
  • A reference file for verifying without the App MCP (Release builds, CI, devices the DevServer does not reach):
    • Android: adb shell uiautomator dump, find nodes by content-desc (from AutomationProperties.Name; AutomationId is not exposed), tap the centre of their bounds, dump again to assert.
    • Windows (Desktop head): Windows UI Automation, finding elements by AutomationId or Name and acting through their patterns (Invoke, Toggle, Value).
    • Other targets: macOS is excluded until [Skia/macOS] Accessibility tree isn't exposed to AX automation clients uno#24669 is fixed; iOS, WebAssembly and Linux stay on the App MCP until verified.
  • Make apps testable: set AutomationProperties.AutomationId and AutomationProperties.Name on every control a test touches. AutomationId only helps on Windows; on Android the Name is the only handle, so it must be unique on its page.
  • Budget screenshots: save captures to files for the report; read one back into the model only for a visual assertion.

Tasks

Acceptance criteria

  • An agent verifying a Release build finds and asserts on controls through the element tree, and reads screenshots only for visual checks.
  • In the FieldCheck re-run, screenshot reads and model calls during verification fall to roughly the level of the comparable session above. (Pending the re-run.)

Related

Activity

  1. added
    kind/performance
    triage/untriaged
    on Sep 29, 2026
  2. removed
    triage/untriaged
    on Oct 5, 2026
  3. kazo0 commented on Oct 5, 2026

    @kazo0
    ContributorAuthor

    Delivered by #162: verified Windows UI Automation and Android uiautomator on a Release build, added the accessibility-first rule to uno-testing/SKILL.md and references/without-app-mcp.md. Upstream gaps are tracked in unoplatform/uno#23934 (Android AutomationId) and unoplatform/uno#24669 (macOS). The only remaining task, the FieldCheck re-run, is queued separately in unoplatform/private.

  4. added theissue type on Oct 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/performancetool/Uno Platform Skills

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions