-
Notifications
You must be signed in to change notification settings - Fork 1.9k
[ci] Run xharness DeviceTests on dnceng-public Helix #30544
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
414b00a to
d7d6eb4
Compare
d844e98 to
3ea6049
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR enables running device tests on Helix with xharness by introducing support for both traditional and Helix-based testing modes. The changes include correcting project path inconsistencies for MauiBlazorWebView.DeviceTests across solution files, enhancing build configurations for device tests, and adding comprehensive Helix/XHarness testing infrastructure.
Key changes:
- Updated project paths for MauiBlazorWebView.DeviceTests across multiple solution files to use the correct
DeviceTestsdirectory - Added new Helix and XHarness testing infrastructure with pipeline templates and project configurations
- Enhanced memory testing utilities with improved garbage collection handling and async support
Reviewed Changes
Copilot reviewed 24 out of 53 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| Multiple solution files | Corrected MauiBlazorWebView.DeviceTests project path references |
| eng/helix_xharness.proj | New Helix project configuration for iOS, macOS Catalyst, and Android device testing |
| eng/pipelines/arcade/stage-device-tests.yml | New pipeline template for Helix-based device testing |
| eng/Build.props | Added conditional build support for device test projects |
| src/TestUtils/src/DeviceTests/AssertionExtensions.cs | Enhanced garbage collection testing utilities with async support |
| Multiple test files | Updated test code to use new collection syntax and skip problematic tests on Helix |
| public static async Task AssertEventuallyAsync(this Task<bool> assertion, int timeout = 1000, int interval = 100, string message = "Assertion timed out") | ||
| { | ||
| do | ||
| { | ||
| if (await assertion) |
Copilot
AI
Aug 6, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The AssertEventuallyAsync method evaluates the assertion task multiple times by awaiting it repeatedly. Since Task can only be awaited once, subsequent awaits will throw an InvalidOperationException. The task should be stored and its result cached, or the method should accept a Func<Task> instead.
| public static async Task AssertEventuallyAsync(this Task<bool> assertion, int timeout = 1000, int interval = 100, string message = "Assertion timed out") | |
| { | |
| do | |
| { | |
| if (await assertion) | |
| public static async Task AssertEventuallyAsync(this Func<Task<bool>> assertion, int timeout = 1000, int interval = 100, string message = "Assertion timed out") | |
| { | |
| do | |
| { | |
| if (await assertion()) |
Copilot uses AI. Check for mistakes.
| value: $(Build.SourcesDirectory)\build.cmd -ci | ||
| - name: _buildScriptMacOS | ||
| value: $(Build.SourcesDirectory)/build.sh -ci -warnAsError 0 | ||
| value: $(Build.SourcesDirectory)/build.sh -ci -warnAsError false |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i m still not sure about this one
| <IncludeXHarnessCli>true</IncludeXHarnessCli> | ||
| <!-- Optional: Specific version of Xcode to use. If omitted, xcode-select is used to | ||
| determine the version --> | ||
| <!-- <XHarnessXcodeVersion>16.3</XHarnessXcodeVersion> --> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do the queues can have more than 1 Xcode version @akoeplinger ?
| @@ -0,0 +1,12 @@ | |||
| { | |||
| "version" : 1, | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is for retries.. not sure if it works right now
49ef863 to
e13c25e
Compare
|
/rebase |
b217e54 to
bf05ba6
Compare
# Conflicts: # eng/pipelines/device-tests.yml
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
f39c289 to
edb319b
Compare
This reverts commit b676c31.
|
@matouskozak this was fixed with dotnet/arcade#15672 in arcade 10.0/main, but maui is still on arcade 9.0 |

Description of Change
Enable a way to run device tests on Helix with xharness.
Right now we going to support both modes, helix and non helix as we are doing the move.
Example run https://dev.azure.com/dnceng-public/public/_build/results?buildId=1115383&view=results
About helix
Check available queues https://helix.dot.net (right now we just going to use open)
Number of Tests (from visual test runner)
iOS: 3676
Controls: 814
Core: 2529
Graphics: 33
Blazor: 6
Essentials: 294
Catalyst: 3373
Controls:658
Core: 2388
Graphics: 33
Blazor:6
Essentials: 288
Android: 3435
Controls:999
Core: 2995
Graphics: 33
Blazor:6
Essentials: 302
Documentation about xharness on Helix https://github.com/dotnet/arcade/blob/main/src/Microsoft.DotNet.Helix/Sdk/tools/xharness-runner/Readme.md#android-apk-payloads
Run locally from the Mac
The arcade system uses ./build.sh and /build.cmd as the start point, and it will look at the Build.props file for information of what projects to build
This pull request introduces improvements to how device tests are built and run in the MAUI repository, with a focus on pipeline and infrastructure updates. The changes standardize the location of device test projects, add new build and test orchestration for device tests, and enhance pipeline configuration for running tests on iOS, Android, and MacCatalyst via Helix and XHarness.
Device Test Infrastructure Improvements
stage-device-tests.ymlto orchestrate building and running device tests on iOS, Android, and MacCatalyst using Helix and XHarness. This enables automated device test runs in CI for multiple platforms.helix_xharness.projto define scenarios and test payloads for device tests, supporting discovery and execution of test bundles for Controls, Core, Graphics, Essentials, and MauiBlazorWebView.Build.propsto conditionally build device test projects when theBuildDeviceTestsproperty is set, supporting parallel and platform-specific builds for Controls, Core, Graphics, Essentials, and MauiBlazorWebView device tests.Project Structure and Solution Updates
MauiBlazorWebView.DeviceTests.csprojby moving it fromsrc/BlazorWebView/tests/MauiDeviceTests/tosrc/BlazorWebView/tests/DeviceTests/in all relevant solution and solution filter files. This improves consistency and discoverability of device test projects. [1] [2] [3] [4] [5] [6]Pipeline and Build Script Enhancements
helix.projto set default build numbers, queue selection, and Azure Pipelines reporting, as well as correcting paths for unit test projects. [1] [2]These changes collectively modernize and automate the device test workflow for MAUI, making it easier to run comprehensive tests across multiple platforms in CI.
Issues Fixed
Fixes #30466