Skip to content

[ci] Run MAUI R2R tests with XHarness - #12666

Open
simonrozsival wants to merge 2 commits into
mainfrom
simonrozsival-investigate-helix-device-failures
Open

[ci] Run MAUI R2R tests with XHarness#12666
simonrozsival wants to merge 2 commits into
mainfrom
simonrozsival-investigate-helix-device-failures

Conversation

@simonrozsival

Copy link
Copy Markdown
Member

Summary

  • replace the bespoke MAUI R2R Android adb work-item script with Arcade's XHarnessApkToTest integration
  • use xharness android install so package-manager failures receive XHarness's device reboot and install retry behavior
  • preserve the existing monkey launch, pidof smoke check, and uploaded device/package/logcat diagnostics
  • pin the same XHarness CLI version currently used by MAUI and allow additional time for reboot recovery

Context

The existing script exits immediately on INSTALL_FAILED_INSUFFICIENT_STORAGE, bypassing XHarness's recovery path. This contributed to the repeated Helix device failures tracked by dotnet/arcade#17483 and #12658.

Validation

  • generated a Windows XHarnessApkToTest work-item archive with the pinned Helix SDK
  • verified the archive contains the APK, Android Helix wrapper, diagnostics processor, and custom smoke-test command
  • verified XHarness CLI 11.0.0-prerelease.26428.1 is available from the configured engineering feed

Use Arcade's XHarness Android work items so transient device installation failures get the standard reboot and retry behavior while retaining the existing app launch smoke checks and diagnostics.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot AI lite review requested due to automatic review settings September 3, 2026 16:42

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟡 Changes recommended

The new Helix MSBuild project currently allows XHarnessApkToTest to run without validating AndroidPackageName, which can lead to confusing failures and should be gated/validated before merge.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Review tier: Lite
Findings: 1 Medium severity · 1 Low severity

New issues introduced by this change (2)
Severity Finding
Medium severity build-tools/​automation/​MauiR2RHelix.proj — ❌ error — XHarnessApkToTest is enabled when WorkItemApk is set, but AndroidPackageName can…
Low severity build-tools/​automation/​MauiR2RHelix.proj⚠️ warning — These Set-Content/Add-Content calls don’t specify an encoding. On Windows…
What changed in this PR

This PR updates the MAUI R2R Helix submission flow in dotnet/android CI to use Arcade/Helix’s XHarnessApkToTest integration (instead of a bespoke adb-driven work-item script), aiming to improve resiliency on device install failures by leveraging XHarness’s retry/reboot behavior while preserving the existing smoke-test behavior and diagnostics uploads.

Changes:

  • Adds an eng/Versions.props pin for the XHarness CLI version intended to match MAUI’s usage.
  • Updates the MAUI R2R Helix matrix template to stage only the signed APK and submit Helix work items using WorkItemApk/AndroidPackageName env vars, with a longer work-item timeout.
  • Switches MauiR2RHelix.proj from HelixWorkItem to XHarnessApkToTest and embeds PowerShell-based custom commands for install + monkey launch + pidof smoke check + log capture/uninstall.
File Description
eng/​Versions.props Introduces a pinned XHarness CLI version property.
build-tools/​automation/​yaml-templates/​run-maui-r2r-helix-matrix.yaml Removes the custom adb/payload script generation and submits Helix work items via WorkItemApk + AndroidPackageName, increasing timeout.
build-tools/​automation/​MauiR2RHelix.proj Uses XHarnessApkToTest with embedded custom commands to install/launch/validate/log/uninstall the APK.

<Command>$(WorkItemCommand)</Command>
<Timeout Condition="'$(WorkItemTimeout)' != ''">$(WorkItemTimeout)</Timeout>
</HelixWorkItem>
<XHarnessApkToTest Include="$(HelixWorkItemName)" Condition="'$(WorkItemApk)' != ''">
Comment on lines +27 to +29
"Scenario: $(HelixTestRunName)" | Set-Content -LiteralPath (Join-Path $output_directory "scenario-$(HelixConfiguration).txt")
"PackageName: $package_name" | Add-Content -LiteralPath (Join-Path $output_directory "scenario-$(HelixConfiguration).txt")
"APK: $app" | Add-Content -LiteralPath (Join-Path $output_directory "scenario-$(HelixConfiguration).txt")
Resolve the central versions conflict by retaining the updated build task dependency and the XHarness CLI pin.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants