Repository navigation
Conversation
Migrate xUnit suites and native device hosts to xUnit v3 and Microsoft.Testing.Platform, retain NUnit Appium integration, and run tests directly in CI with real TRX reporting. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Preserve the complete default platform matrix while allowing focused secondary-pipeline validation. Add the technical terms introduced by the migration documentation to the spelling dictionary. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Add an explicit native Windows validation mode without review automation or automatic triggers. Keep the recursive trusted-asset workflow regression aligned with the new launcher sources. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Parse entry text with the culture used to format it. Keep the existing decimal-value assertions intact and verify both French and English runner cultures. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Restore the Copilot pipeline unchanged and use the dedicated device-tests pipeline for migration validation. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Do not label the existing Windows Server image as Windows 11 or reject it with an implicit client-only guard. Preserve interactive desktop and x64 checks, both packaging modes, and an explicit Windows 11 client requirement for client pools. Document the client-specific coverage difference. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Fix the nonexistent image demands reported by the remote provider. Preserve both runtimes by default while exposing the existing runtime matrix for focused runs. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Document macOS 15/26 and Windows 11 client coverage gaps explicitly while retaining strict OS checks and configurable execution pools. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Preserve the selected RID on Windows project references and scope package generation to native test applications instead of their library dependencies. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Reset handler factories, avoid shared Entry and theme state, and observe binding failures on the test task instead of throwing from asynchronous diagnostic callbacks. Exclude stale generated Debug sources from Release compilation. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Avoid truthy string False values enabling Windows jobs or choosing CoreCLR for Mono lanes in legacy mapping-form templates. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Keep binding diagnostics scoped to the exact binding and assert every reported diagnostic, preserving the original expected message. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Use the standard xUnit executor on the real app dispatcher and verify actual fact/theory UI execution. Import the Desktop-only Appx module through Windows PowerShell compatibility when installing and cleaning owned packages from pwsh. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Assert both invocation and disposal errors on all platforms without leaving the app's root service provider faulted. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Avoid empty emulator console responses on macOS while preserving exact AVD identity checks and owned cleanup. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Release APK assembly stores and ReadyToRun both leave Assembly.Location empty. Use supported SDK fast deployment and IL loading while retaining Release optimization; document the loading-coverage difference. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Reproduce a pre-existing native UI thread without inherited AsyncLocal state, then flow the caller's execution context without replacing the UI synchronization context. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
…overage Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Keep the retired Helix entrypoint deleted while migrating main's new visual-comparer project into the xUnit v3/MTP inventory. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
xUnit v3 now awaits fixture disposal; keep animation-manager teardown on the Android Looper instead of disposing its platform ticker on an MTP worker. Preserve the existing leak assertions. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Exercise AnimationManager startup with an explicitly enabled platform ticker without changing system accessibility settings. Retain synchronous MTP logs when a native test exits before finalizing TRX. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Restore AppActions' launcher prerequisite and unregister test lifecycle listeners before their Java callbacks can be collected. Preserve all regression assertions. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Use xUnit v3 4.0.2 and coherent MTP 2.5.1 modules for existing theory display-name filters. Preserve sequential execution, timeouts and cancellation; align NUnit's bridge and attachment paths; keep native attributes out of the Appium host. Use OS-native child probes without changing shared build environment. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Collect fresh DiagnosticReports entries containing the job-owned simulator UUID, preserving evidence when the native app aborts before producing TRX. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
1 task done
The AppX deployment service ignores CurrentUser trust, so installing the self-signed test package failed with 0x800B0109. Add only the public certificate machine-wide (as the former Helix setup did); the private key stays non-exportable in CurrentUser\My, and cleanup removes the owned certificate from every store. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
… is already disconnected ShellView.Disconnect read the typed ShellItemHandler.PlatformView, which throws once that handler is disconnected. It runs from Window.Closed, so the exception terminated the process (0xDEAD), aborting the Controls device-test run at SearchHandlerFocusTracksDetachment. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
kubaflo
had a problem deploying
to
skill-evaluation-pat-pool
November 27, 2026 20:22 — with
GitHub Actions
Failure
kubaflo
had a problem deploying
to
skill-evaluation-pat-pool
November 27, 2026 20:22 — with
GitHub Actions
Failure
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
…uncher The WinApp build tools replace RunCommand with 'winapp run', which tries to register a development-mode package and fails because the owned signed MSIX is already installed. Disable their run support for packaged device tests so dotnet test uses MauiTestLauncherPath. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
The Windows Controls suite now runs in one process (XHarness ran each category in its own), and closed but uncollected test windows keep their GDI objects until finalized; runs ended with 0xDEAD at ~8,000 GDI objects after 350-600 tests. Collect and finalize when usage passes a threshold, logging the counts before and after. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
kubaflo
had a problem deploying
to
skill-evaluation-pat-pool
November 27, 2026 20:57 — with
GitHub Actions
Failure
kubaflo
had a problem deploying
to
skill-evaluation-pat-pool
November 27, 2026 20:57 — with
GitHub Actions
Failure
… out" CI showed forced collections do not lower the GDI count (3033 -> 3162, 14525 -> 14601), and the host passed 10,000 GDI objects without crashing, so this was not the cause. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
In one process the Windows Controls suite terminates with 0xDEAD at a fixed point (CollectionView2 focus after 599 tests on main, NavigationPage title icon after 346 on net11) in tests that pass in isolation, as they did when cake/Helix ran one process per category. Restore that isolation: build once, then run each category (and the uncategorized rest) with --no-build, keeping one TRX per category and continuing after a failure. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
kubaflo
had a problem deploying
to
skill-evaluation-pat-pool
November 27, 2026 21:23 — with
GitHub Actions
Failure
kubaflo
had a problem deploying
to
skill-evaluation-pat-pool
November 27, 2026 21:23 — with
GitHub Actions
Failure
The testing platform's controller exits 0xDEAD when its test host crashes, and native fail-fast crashes produce neither a .NET crash dump nor a managed exception. Register Windows Error Reporting local dumps for the test executables (removed afterwards), and collect application error events for the per-category test host PIDs. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
kubaflo
had a problem deploying
to
skill-evaluation-pat-pool
November 27, 2026 21:54 — with
GitHub Actions
Failure
kubaflo
had a problem deploying
to
skill-evaluation-pat-pool
November 27, 2026 21:54 — with
GitHub Actions
Failure
1 of 2 tasks
kubaflo
added a commit
that referenced
this pull request
Nov 28, 2026
…anged requires 10.0.19041) (#40751) <!-- Please let the below note in for people that find this PR --> > [!NOTE] > Are you waiting for the changes in this PR to be merged? > It would be very helpful if you could [test the resulting artifacts](https://github.com/dotnet/maui/wiki/Testing-PR-Builds) from this PR and let us know in a comment if this change resolves your issue. Thank you! <!-- Open .NET 11 fix PRs against net11 for review; target main for next-major features. After approval, a maintainer manually retargets the fix PR to the active inflight branch and merges it directly there. Do not merge individual fixes into net11. Bots must not retarget or merge. Candidate integration into net11 and release/* changes are separate, explicitly coordinated release work. --> ### Target Branch | This PR is for | Initial base | | --- | --- | | New features, API changes, or .NET 12 work (including .NET 12 fixes) | `main` | | .NET 11 servicing fixes | `net11`, for review | | Older servicing, release integration, infrastructure, or documentation | The branch designated for that work | - [x] I selected the applicable base branch using the [contribution guide](https://github.com/dotnet/maui/blob/main/.github/CONTRIBUTING.md#choose-your-pr-base-before-starting). For .NET 11 fixes, only a maintainer retargets the approved PR to the active inflight lane and merges it after CI validates that final base. Do not merge individual fixes directly into `net11`; agents must not retarget or merge. ### Description of Change Follow-up to #40720. `main` still fails every Windows build (maui-pr, maui-pr-uitests Windows sample apps, maui-pr-devicetests Windows) with CA1416, now in Controls: ``` src\Controls\src\Core\Animations\MotionPolicy.Windows.cs(19,4): error CA1416: This call site is reachable on: 'Windows' 10.0.17763.0 and later. 'UISettings.AnimationsEnabledChanged' is only supported on: 'Windows' 10.0.19041.0 and later. src\Controls\src\Core\Animations\MotionPolicy.Windows.cs(22,35): error CA1416: (same, unsubscribe) ``` Seen in maui-pr [1703328](https://dev.azure.com/dnceng-public/public/_build/results?buildId=1703328), maui-pr-uitests [1703372](https://dev.azure.com/dnceng-public/public/_build/results?buildId=1703372) and maui-pr-devicetests [1703407](https://dev.azure.com/dnceng-public/public/_build/results?buildId=1703407) at `bd06cae91b`. #40720 fixed the same API in Core's `PlatformTicker`; once Core compiled, Controls (`PlatformMotionPolicy`, added in #40536) surfaced the same error. The fix mirrors #40720: subscribe/unsubscribe to `UISettings.AnimationsEnabledChanged` only on Windows 10.0.19041+. On older builds the reduced-motion value is still read from `UISettings.AnimationsEnabled`; it just isn't updated live. This is the only remaining `AnimationsEnabledChanged` use in `src/`. The same hunk is also part of the large migration PR #40661 (and its validation draft #40706); the change is identical, so it will reconcile cleanly. **Validation** (macOS, minimal `net11.0-windows10.0.19041.0` project with `SupportedOSPlatformVersion=10.0.17763.0`, `EnableWindowsTargeting=true`, CA1416 as error, compiling the exact before/after code with `dotnet build`): - baseline (current code): red, the same two CA1416 errors - fix: green - fix reverted: red - restored: green The full Windows build runs in this PR's CI. ### Issues Fixed Fixes the `main` Windows build break (CA1416) left after #40720. ### Let AI finish this PR - [ ] **Let the MAUI agent address review feedback and fix remaining issues on this PR.** Maintainers still decide whether it is merged. For PRs from forks, the agent opens a follow-up PR that keeps your commits. <!-- Verify the target branch follows the release workflow in docs/ReleaseBranchWorkflow.md. Infrastructure and documentation changes should target the branch where they apply. -->
kubaflo
added a commit
that referenced
this pull request
Nov 28, 2026
<!-- Please let the below note in for people that find this PR --> > [!NOTE] > Are you waiting for the changes in this PR to be merged? > It would be very helpful if you could [test the resulting artifacts](https://github.com/dotnet/maui/wiki/Testing-PR-Builds) from this PR and let us know in a comment if this change resolves your issue. Thank you! <!-- Open .NET 11 fix PRs against net11 for review; target main for next-major features. After approval, a maintainer manually retargets the fix PR to the active inflight branch and merges it directly there. Do not merge individual fixes into net11. Bots must not retarget or merge. Candidate integration into net11 and release/* changes are separate, explicitly coordinated release work. --> ### Target Branch | This PR is for | Initial base | | --- | --- | | New features, API changes, or .NET 12 work (including .NET 12 fixes) | `main` | | .NET 11 servicing fixes | `net11`, for review | | Older servicing, release integration, infrastructure, or documentation | The branch designated for that work | - [x] I selected the applicable base branch using the [contribution guide](https://github.com/dotnet/maui/blob/main/.github/CONTRIBUTING.md#choose-your-pr-base-before-starting). This is test infrastructure for the .NET 12 (`main`) line, so it targets `main`. ### Description of Change Migrate all repository test execution from **Helix + XHarness** to plain **`dotnet test`** on **Microsoft.Testing.Platform (MTP)**. This PR carries the migration from #39918 (by @mattleibow, commits preserved) brought up to date with current `main` (.NET 12 SDK, `/review run-device-tests`, recent product and test fixes), plus the follow-up fixes needed to make it build and pass on .NET 12. #### Why we need this - **One way to run tests, everywhere.** Today unit tests run through Arcade's Helix SDK (`eng/helix.proj`), device tests through Helix + XHarness (`eng/helix_xharness.proj`), Appium tests through Cake, and locally through yet other scripts. After this change the same command — `dotnet test --project <test project>` (plus `--device` for mobile) — runs every suite on a developer machine, in CI, and in the Copilot review gate. A CI failure can be reproduced locally with the exact command CI used. - **Remove a fragile, opaque layer.** Helix/XHarness add payload zipping, remote queues, a job monitor, custom work-item scripts and a separate result path. Many recurring device-test infra failures (XHarness exit 78/80/83 `APP_LAUNCH_FAILURE`/`APP_CRASH`, Helix jobs never scheduled, stale or missing `testResults.xml`, queue/image drift such as XHarness requiring an iPhone 11 Pro device type that iOS 27.1+ no longer ships) come from that layer, not from MAUI. Direct execution on the agent gives real logs, real exit codes and the actual device in the job. - **Genuine, trustworthy results.** Every suite now produces the test framework's own TRX via MTP (`--report-trx`), and empty selections or missing reports fail the job instead of silently passing. On Android/iOS the native app's own TRX is collected and reconciled with the host proxy, so a crash cannot be reported as a pass. - **Modern test stack.** xUnit v2 + VSTest + XHarness test runners are replaced by **xUnit v3 + MTP**, which is what the .NET SDK `dotnet test` and device (`--device`) support is built on. This unblocks newer xUnit features (`TestContext`, cancellation, `Assert.Skip*`) and keeps us on the path the SDK supports directly. - **Fewer moving parts to maintain.** Removes `eng/helix.proj`, `eng/helix_xharness.proj`, the Helix pipeline stages, the XHarness CLI tool, and the XHarness/Helix package dependencies. #### What changes - **Unit tests**: all repository xUnit suites move to xUnit v3 (`4.0.2`) on MTP (`2.5.1`); `global.json` selects `Microsoft.Testing.Platform` as the `dotnet test` runner. CI (`stage-unit-tests.yml`) runs each project with `dotnet test --project … --report-trx` on Windows and macOS (Debug and Release) and validates the TRX (`eng/scripts/Assert-TestResults.ps1`). Helix unit-test stages are removed. - **Device tests** (Controls, Core, Graphics, Essentials, BlazorWebView): the XHarness/visual runners are replaced by native MTP hosts — Android instrumentation, the normal Apple MAUI app/scene lifecycle, and an owned Windows MSIX/unpackaged launcher. `maui-pr-devicetests` runs them directly on device-capable agents (`stage-device-tests.yml`, `device-tests-steps.yml`) with job-owned emulators/simulators. - **UI tests (Appium)** stay on NUnit, now hosted on MTP with matching fixture-failure, retry and attachment handling. - **Integration tests** run with `dotnet test`; legacy `--filter` selectors are translated to MTP filters. iOS template apps are launched with `simctl` on a dedicated simulator instead of XHarness. - **Local tooling** (`Run-DeviceTests.ps1`, Cake, review-gate scripts, skills/instructions) updated to the same direct commands. #### Changes made while bringing #39918 onto current `main` - Merged `main` (.NET 12 move #40060, `/review run-device-tests` #40545, review-gate removal #40595, and other fixes) and resolved 23 conflicts. - **`/review run-device-tests` selection ported** to the direct template: `ci-device-tests.yml` passes `selectedRun`/`selectedPlatforms`/`selectedProjects`/`selectedFilters`, and `stage-device-tests.yml` runs only the selected platforms and projects with the selected category skip-lists. Verified with the AzDO YAML preview API (full run: 28 jobs; a sample selection of Android+iOS / Controls+Essentials with `SkipCategories=Shell,Label`: exactly 4 jobs with that filter). `eng/helix_xharness.proj` is no longer a trusted dispatch path. - **Device tests default to `net12.0` and CoreCLR only** — the .NET 12 mobile workloads no longer provide Mono (same as #40060). - Took main's Switch hover-resource fix (#40209) over the PR's earlier variant; kept the HybridWebView asset-ownership change together with main's `DynamicDependency`. - Ported main's UI-test retry recovery rules (#40407) into the shared `UITestRetry.cs` used by Cake and MTP. - Dropped the XHarness-only simulator runtime selection (`SelectLatestIOSVersion`) and its tests; runtime/device-type selection is covered by `SimulatorTests`. #### Fixes found by running CI / locally after the merge - **xUnit v3 adaptation of tests added on `main`**: `TestContext.Current.CancellationToken` (xUnit1051), source-info constructor for `WindowsFact` (xUnit3003); `UITest.NUnit.Tests` and the Windows launcher build for the repo TFM instead of `net11.0`. - **Async-void / inline continuation differences in xUnit v3** (v2's `AsyncTestSyncContext` hid them): - `ListProxyTests.SynchronizedCollectionAdd` leaked thread-static dispatcher options onto a thread-pool thread, so later tests got a dispatcher that always required dispatch (68 Storyboard failures in macOS Release). Restored after use; fixtures reset the options. - Shell tests resumed inline from `Navigated`, so the *next* tests ran inside Shell's navigation callback and had their implicit routes reset (`DeferPopNavigation(Pop)`). Verified locally by detecting `FireNavigatedEvents` on the next test's stack before/after the change. - **Native runner thread affinity** (test bodies run on the thread pool, not the UI thread as under XHarness): `WillTerminateDestroysMainPageWindowOnce` resolved the `Application` off the UI thread; the CarouselView leak test posted a UIKit notification off the UI thread. - **iOS simulator selection**: only use device types that the runtime lists (device-specific iOS 27.1 builds only accept one, causing `SimError 403 Incompatible device`), and prefer the iPhone 11 Pro profile XHarness used (Shell flyout header geometry tests from #39877 fail on Dynamic Island phones; passes on iPhone 11 Pro, fails on iPhone 16 — reproduced locally). - **Mac Catalyst**: `dotnet test` starts the app executable directly, so unlike `open`/XHarness it isn't activated; activate it before running (animated CarouselView scrolls intermittently never finished). - **Integration tests**: shut down build servers after installing the test workloads — reused MSBuild nodes kept a stale workload resolver and nested `UseWorkload=true` sample builds failed with NU1015 (reproduced locally; Samples macOS now passes in CI). The Android `maui-blazor` + `TrimMode=full` row is skipped explicitly: the previous runner silently dropped `TrimMode`, and Blazor does not support full trimming (dotnet/aspnetcore#63951). - **Windows `HybridWebView` disconnect** NRE when `CoreWebView2` is not (or no longer) initialized — exposed by the new fixture teardown that disconnects every handler. - Docs spellcheck word, and a template boolean comparison so the device stage doesn't expand to zero jobs. - **UI-test retry reconciliation**: when a fixture's `OneTimeSetUp` fails, NUnit reports its `[Ignore]`d tests as failed and the retry reports them skipped. MTP's TRX names classes of fixtures with arguments (every UI-test fixture, e.g. `EditorFeatureTests(Windows)`) by namespace only, so the ignored tests were never matched as recovered and the job failed although the retry passed. Replaying the real CI TRX/NUnit reports reproduces the failure before the fix and merges cleanly after it; `FixtureRecoveryReconcilesIgnoredTestsInParameterizedFixtures` covers it. - **iOS CarouselView test timing** (`Animated ScrollTo Does Not Report Positions It Passes Over`, failed on every native CI run, passed under Helix): with logging, every failing run showed a still-queued initial-position pass scrolling back to page 0 without animation, cancelling the test's animated `ScrollTo`. Under the native runner the test can resume between those queued passes. The test now lets them drain; full-class cold runs went from 2/9 failing to 5/5 passing, and it passes in CI. - **`main` build breaks from re-enabled CA1416** (#40663): carried the fixes from #40708 (merged) and #40720 (`UISettings.AnimationsEnabledChanged` in `PlatformTicker` and `MotionPolicy` requires Windows 10.0.19041). The Windows errors only surfaced one project at a time because `Core` references `Essentials`. ### Validation Local (macOS arm64, .NET SDK `12.0.100-alpha.1.26523.103`, Debug, `dotnet test --project <csproj> --report-trx`): | Project | Result | | --- | --- | | Controls.Xaml.UnitTests | 2,327 passed, 8 skipped | | Controls.Core.UnitTests | 7,453 passed, 30 skipped | | Controls.BindingSourceGen.UnitTests | 135 passed | | SourceGen.UnitTests | 997 passed | | Core.UnitTests | 1,147 passed | | Resizetizer.UnitTests | 795 passed, 3 skipped | | Essentials.UnitTests | 520 passed | | Essentials.ExternalBackend.UnitTests | 6 passed | | Graphics.Tests | 406 passed | | VisualTestUtils.MagickNet.Tests | 13 passed | | MauiBlazorWebView.UnitTests | 70 passed | | MauiBlazorWebView.ExternalHandler.UnitTests | 52 passed | | UITest.NUnit.Tests | 50 passed, 5 skipped | | TestUtils.UnitTests | 61 passed, 1 skipped | Pester (pipeline/runner scripts): `Direct-TestDevice`, `Cake-Mtp`, `RunTests`, `NUnitMtp`, `XunitMtp`, `Run-DeviceTests`, `WindowsTestPackage`, `Assert-TestResults`, `CopilotPipeline`, `Review-PR`, `Verify-TestsFail`, `BuildAndRunHostApp`, `Review-Tests`, `Recover-MissedReviewCommands`: 600+ passed. The only remaining failure (`handles qualified selections in every stage guard`, expects 10 vs 11) also fails on `main` and is unrelated. Note: `StoryboardTests.StoppingFromPropertyChangingDuringATakeoverRaisesOnePairOfNotifications` (added on `main`) is culture-sensitive and fails under a comma-decimal locale on `main` as well; it passes under `en-US` as in CI. #### CI Every pipeline was run with `/azp run` on this PR and on validation-only drafts: - #40703: this PR's changes on `net11`. - #40705: the #40703 changes plus sample PRs #40696, #40660, #40654 and #40691, to check that tests added by other PRs run under the native runners. - #40706: this PR plus sample PR #40669. Failures were compared against `main`/`net11` Helix baselines by test name. | Pipeline | This PR (`main`) | `net11` validation (#40703 / #40705) | | --- | --- | --- | | `maui-pr` (build, pack, unit tests, integration) | ✅ 35/35 jobs (with the CA1416 fixes) | ✅ 33/33 jobs | | `maui-pr-devicetests` | ✅ Android, iOS, Mac Catalyst except `PageTransitions` tests that fail identically in `main`'s Helix runs | ✅ Android, iOS, Mac Catalyst; only intermittent single-test failures that don't repeat across runs | | `maui-pr-uitests` (Appium on MTP) | ✅ 133/134 jobs; the only failure, WinUI `SharedElementLandsAndSourceIsRestoredAfterPop`, also fails on `main`'s Helix runs | ✅ 130/133; see below | Remaining UI-test failures on `net11`, none of them regressions: - `DragAndDropWithAnElementThatIsRemoved` (Mac Catalyst) fails in 2 of the last 10 `net11` Helix runs too. - The RefreshView tests failed only on #40705, which includes RefreshView sample PR #40660. - The `vlatest` shard failed because the agent couldn't download the iOS 18.5 simulator runtime. - Material3 (API 36) screenshots in the last two runs came out 87 px taller. #40603, merged on `net11` yesterday, now crops by the status-bar height that Appium reports. The same tree and emulator setup passed 430/433 in the two previous runs. **Known remaining device-test blockers (from #39918, not regressions of this merge):** packaged Windows MSIX installation is rejected with `0x800B0109` (the temporary signer is not a trusted root on the agent image — needs owner-provided signing/provisioning), and the Windows Controls unpackaged suite can terminate with `0xDEAD` after ~350 tests (native composition resource exhaustion investigated in #39918). ### Issues Fixed No product issue. Supersedes/continues #39918. --------- Co-authored-by: Matthew Leibowitz <mattleibow@live.com> Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
kubaflo
added a commit
that referenced
this pull request
Nov 28, 2026
…[net11] <!-- Please let the below note in for people that find this PR --> > [!NOTE] > Are you waiting for the changes in this PR to be merged? > It would be very helpful if you could [test the resulting artifacts](https://github.com/dotnet/maui/wiki/Testing-PR-Builds) from this PR and let us know in a comment if this change resolves your issue. Thank you! <!-- Open .NET 11 fix PRs against net11 for review; target main for next-major features. After approval, a maintainer manually retargets the fix PR to the active inflight branch and merges it directly there. Do not merge individual fixes into net11. Bots must not retarget or merge. Candidate integration into net11 and release/* changes are separate, explicitly coordinated release work. --> | This PR is for | Initial base | | --- | --- | | New features, API changes, or .NET 12 work (including .NET 12 fixes) | `main` | | .NET 11 servicing fixes | `net11`, for review | | Older servicing, release integration, infrastructure, or documentation | The branch designated for that work | - [x] I selected the applicable base branch using the [contribution guide](https://github.com/dotnet/maui/blob/main/.github/CONTRIBUTING.md#choose-your-pr-base-before-starting). This is test infrastructure for the .NET 12 (`main`) line, so it targets `main`. Migrate all repository test execution from **Helix + XHarness** to plain **`dotnet test`** on **Microsoft.Testing.Platform (MTP)**. This PR carries the migration from #39918 (by @mattleibow, commits preserved) brought up to date with current `main` (.NET 12 SDK, `/review run-device-tests`, recent product and test fixes), plus the follow-up fixes needed to make it build and pass on .NET 12. - **One way to run tests, everywhere.** Today unit tests run through Arcade's Helix SDK (`eng/helix.proj`), device tests through Helix + XHarness (`eng/helix_xharness.proj`), Appium tests through Cake, and locally through yet other scripts. After this change the same command — `dotnet test --project <test project>` (plus `--device` for mobile) — runs every suite on a developer machine, in CI, and in the Copilot review gate. A CI failure can be reproduced locally with the exact command CI used. - **Remove a fragile, opaque layer.** Helix/XHarness add payload zipping, remote queues, a job monitor, custom work-item scripts and a separate result path. Many recurring device-test infra failures (XHarness exit 78/80/83 `APP_LAUNCH_FAILURE`/`APP_CRASH`, Helix jobs never scheduled, stale or missing `testResults.xml`, queue/image drift such as XHarness requiring an iPhone 11 Pro device type that iOS 27.1+ no longer ships) come from that layer, not from MAUI. Direct execution on the agent gives real logs, real exit codes and the actual device in the job. - **Genuine, trustworthy results.** Every suite now produces the test framework's own TRX via MTP (`--report-trx`), and empty selections or missing reports fail the job instead of silently passing. On Android/iOS the native app's own TRX is collected and reconciled with the host proxy, so a crash cannot be reported as a pass. - **Modern test stack.** xUnit v2 + VSTest + XHarness test runners are replaced by **xUnit v3 + MTP**, which is what the .NET SDK `dotnet test` and device (`--device`) support is built on. This unblocks newer xUnit features (`TestContext`, cancellation, `Assert.Skip*`) and keeps us on the path the SDK supports directly. - **Fewer moving parts to maintain.** Removes `eng/helix.proj`, `eng/helix_xharness.proj`, the Helix pipeline stages, the XHarness CLI tool, and the XHarness/Helix package dependencies. - **Unit tests**: all repository xUnit suites move to xUnit v3 (`4.0.2`) on MTP (`2.5.1`); `global.json` selects `Microsoft.Testing.Platform` as the `dotnet test` runner. CI (`stage-unit-tests.yml`) runs each project with `dotnet test --project … --report-trx` on Windows and macOS (Debug and Release) and validates the TRX (`eng/scripts/Assert-TestResults.ps1`). Helix unit-test stages are removed. - **Device tests** (Controls, Core, Graphics, Essentials, BlazorWebView): the XHarness/visual runners are replaced by native MTP hosts — Android instrumentation, the normal Apple MAUI app/scene lifecycle, and an owned Windows MSIX/unpackaged launcher. `maui-pr-devicetests` runs them directly on device-capable agents (`stage-device-tests.yml`, `device-tests-steps.yml`) with job-owned emulators/simulators. - **UI tests (Appium)** stay on NUnit, now hosted on MTP with matching fixture-failure, retry and attachment handling. - **Integration tests** run with `dotnet test`; legacy `--filter` selectors are translated to MTP filters. iOS template apps are launched with `simctl` on a dedicated simulator instead of XHarness. - **Local tooling** (`Run-DeviceTests.ps1`, Cake, review-gate scripts, skills/instructions) updated to the same direct commands. - Merged `main` (.NET 12 move #40060, `/review run-device-tests` #40545, review-gate removal #40595, and other fixes) and resolved 23 conflicts. - **`/review run-device-tests` selection ported** to the direct template: `ci-device-tests.yml` passes `selectedRun`/`selectedPlatforms`/`selectedProjects`/`selectedFilters`, and `stage-device-tests.yml` runs only the selected platforms and projects with the selected category skip-lists. Verified with the AzDO YAML preview API (full run: 28 jobs; a sample selection of Android+iOS / Controls+Essentials with `SkipCategories=Shell,Label`: exactly 4 jobs with that filter). `eng/helix_xharness.proj` is no longer a trusted dispatch path. - **Device tests default to `net12.0` and CoreCLR only** — the .NET 12 mobile workloads no longer provide Mono (same as #40060). - Took main's Switch hover-resource fix (#40209) over the PR's earlier variant; kept the HybridWebView asset-ownership change together with main's `DynamicDependency`. - Ported main's UI-test retry recovery rules (#40407) into the shared `UITestRetry.cs` used by Cake and MTP. - Dropped the XHarness-only simulator runtime selection (`SelectLatestIOSVersion`) and its tests; runtime/device-type selection is covered by `SimulatorTests`. - **xUnit v3 adaptation of tests added on `main`**: `TestContext.Current.CancellationToken` (xUnit1051), source-info constructor for `WindowsFact` (xUnit3003); `UITest.NUnit.Tests` and the Windows launcher build for the repo TFM instead of `net11.0`. - **Async-void / inline continuation differences in xUnit v3** (v2's `AsyncTestSyncContext` hid them): - `ListProxyTests.SynchronizedCollectionAdd` leaked thread-static dispatcher options onto a thread-pool thread, so later tests got a dispatcher that always required dispatch (68 Storyboard failures in macOS Release). Restored after use; fixtures reset the options. - Shell tests resumed inline from `Navigated`, so the *next* tests ran inside Shell's navigation callback and had their implicit routes reset (`DeferPopNavigation(Pop)`). Verified locally by detecting `FireNavigatedEvents` on the next test's stack before/after the change. - **Native runner thread affinity** (test bodies run on the thread pool, not the UI thread as under XHarness): `WillTerminateDestroysMainPageWindowOnce` resolved the `Application` off the UI thread; the CarouselView leak test posted a UIKit notification off the UI thread. - **iOS simulator selection**: only use device types that the runtime lists (device-specific iOS 27.1 builds only accept one, causing `SimError 403 Incompatible device`), and prefer the iPhone 11 Pro profile XHarness used (Shell flyout header geometry tests from #39877 fail on Dynamic Island phones; passes on iPhone 11 Pro, fails on iPhone 16 — reproduced locally). - **Mac Catalyst**: `dotnet test` starts the app executable directly, so unlike `open`/XHarness it isn't activated; activate it before running (animated CarouselView scrolls intermittently never finished). - **Integration tests**: shut down build servers after installing the test workloads — reused MSBuild nodes kept a stale workload resolver and nested `UseWorkload=true` sample builds failed with NU1015 (reproduced locally; Samples macOS now passes in CI). The Android `maui-blazor` + `TrimMode=full` row is skipped explicitly: the previous runner silently dropped `TrimMode`, and Blazor does not support full trimming (dotnet/aspnetcore#63951). - **Windows `HybridWebView` disconnect** NRE when `CoreWebView2` is not (or no longer) initialized — exposed by the new fixture teardown that disconnects every handler. - Docs spellcheck word, and a template boolean comparison so the device stage doesn't expand to zero jobs. - **UI-test retry reconciliation**: when a fixture's `OneTimeSetUp` fails, NUnit reports its `[Ignore]`d tests as failed and the retry reports them skipped. MTP's TRX names classes of fixtures with arguments (every UI-test fixture, e.g. `EditorFeatureTests(Windows)`) by namespace only, so the ignored tests were never matched as recovered and the job failed although the retry passed. Replaying the real CI TRX/NUnit reports reproduces the failure before the fix and merges cleanly after it; `FixtureRecoveryReconcilesIgnoredTestsInParameterizedFixtures` covers it. - **iOS CarouselView test timing** (`Animated ScrollTo Does Not Report Positions It Passes Over`, failed on every native CI run, passed under Helix): with logging, every failing run showed a still-queued initial-position pass scrolling back to page 0 without animation, cancelling the test's animated `ScrollTo`. Under the native runner the test can resume between those queued passes. The test now lets them drain; full-class cold runs went from 2/9 failing to 5/5 passing, and it passes in CI. - **`main` build breaks from re-enabled CA1416** (#40663): carried the fixes from #40708 (merged) and #40720 (`UISettings.AnimationsEnabledChanged` in `PlatformTicker` and `MotionPolicy` requires Windows 10.0.19041). The Windows errors only surfaced one project at a time because `Core` references `Essentials`. Local (macOS arm64, .NET SDK `12.0.100-alpha.1.26523.103`, Debug, `dotnet test --project <csproj> --report-trx`): | Project | Result | | --- | --- | | Controls.Xaml.UnitTests | 2,327 passed, 8 skipped | | Controls.Core.UnitTests | 7,453 passed, 30 skipped | | Controls.BindingSourceGen.UnitTests | 135 passed | | SourceGen.UnitTests | 997 passed | | Core.UnitTests | 1,147 passed | | Resizetizer.UnitTests | 795 passed, 3 skipped | | Essentials.UnitTests | 520 passed | | Essentials.ExternalBackend.UnitTests | 6 passed | | Graphics.Tests | 406 passed | | VisualTestUtils.MagickNet.Tests | 13 passed | | MauiBlazorWebView.UnitTests | 70 passed | | MauiBlazorWebView.ExternalHandler.UnitTests | 52 passed | | UITest.NUnit.Tests | 50 passed, 5 skipped | | TestUtils.UnitTests | 61 passed, 1 skipped | Pester (pipeline/runner scripts): `Direct-TestDevice`, `Cake-Mtp`, `RunTests`, `NUnitMtp`, `XunitMtp`, `Run-DeviceTests`, `WindowsTestPackage`, `Assert-TestResults`, `CopilotPipeline`, `Review-PR`, `Verify-TestsFail`, `BuildAndRunHostApp`, `Review-Tests`, `Recover-MissedReviewCommands`: 600+ passed. The only remaining failure (`handles qualified selections in every stage guard`, expects 10 vs 11) also fails on `main` and is unrelated. Note: `StoryboardTests.StoppingFromPropertyChangingDuringATakeoverRaisesOnePairOfNotifications` (added on `main`) is culture-sensitive and fails under a comma-decimal locale on `main` as well; it passes under `en-US` as in CI. Every pipeline was run with `/azp run` on this PR and on validation-only drafts: - #40703: this PR's changes on `net11`. - #40705: the #40703 changes plus sample PRs #40696, #40660, #40654 and runners. - #40706: this PR plus sample PR #40669. Failures were compared against `main`/`net11` Helix baselines by test name. | Pipeline | This PR (`main`) | `net11` validation (#40703 / #40705) | | --- | --- | --- | | `maui-pr` (build, pack, unit tests, integration) | ✅ 35/35 jobs (with the CA1416 fixes) | ✅ 33/33 jobs | | `maui-pr-devicetests` | ✅ Android, iOS, Mac Catalyst except `PageTransitions` tests that fail identically in `main`'s Helix runs | ✅ Android, iOS, Mac Catalyst; only intermittent single-test failures that don't repeat across runs | | `maui-pr-uitests` (Appium on MTP) | ✅ 133/134 jobs; the only failure, WinUI `SharedElementLandsAndSourceIsRestoredAfterPop`, also fails on `main`'s Helix runs | ✅ 130/133; see below | Remaining UI-test failures on `net11`, none of them regressions: - `DragAndDropWithAnElementThatIsRemoved` (Mac Catalyst) fails in 2 of the last 10 `net11` Helix runs too. - The RefreshView tests failed only on #40705, which includes RefreshView sample PR #40660. - The `vlatest` shard failed because the agent couldn't download the iOS 18.5 simulator runtime. - Material3 (API 36) screenshots in the last two runs came out 87 px taller. #40603, merged on `net11` yesterday, now crops by the status-bar height that Appium reports. The same tree and emulator setup passed 430/433 in the two previous runs. **Known remaining device-test blockers (from #39918, not regressions of this merge):** packaged Windows MSIX installation is rejected with `0x800B0109` (the temporary signer is not a trusted root on the agent image — needs owner-provided signing/provisioning), and the Windows Controls unpackaged suite can terminate with `0xDEAD` after ~350 tests (native composition resource exhaustion investigated in #39918). No product issue. Supersedes/continues #39918. --------- Co-authored-by: Matthew Leibowitz <mattleibow@live.com> Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> (cherry picked from commit b5108cd) net11 adaptation: net11.0 TFM, CoreCLR + Mono device-test runtimes and net11's Arcade SDK version, matching validation PR #40703. SourceGen tests for .NET 12-only features are not brought over. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Contributor
Author
|
Validation-only PR; the migration landed in #40661, so closing. |
This branch had an error being deployed
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.
Note
Are you waiting for the changes in this PR to be merged?
It would be very helpful if you could test the resulting artifacts from this PR and let us know in a comment if this change resolves your issue. Thank you!
Warning
Validation only — do not merge. Exercises the Helix/XHarness →
dotnet testmigration (#40661) with real contributor PRs on top, to check that their new tests are discovered, run and reported by the native runners.Description of Change
Base: #40661 on
main.Merged PR: #40669 (Essentials Preferences device test on all platforms).
Issues Fixed
None — validation for #40661.