Document WinUI 3 testing with MSTest and MTP - #55324
Merged
Merged
Conversation
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: a2d27ef8-eb6d-4d03-93b9-afe0e0a1d972
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: a2d27ef8-eb6d-4d03-93b9-afe0e0a1d972
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 7e33a7df-138b-46ef-91ef-3ebd19c4f3e6
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 7e33a7df-138b-46ef-91ef-3ebd19c4f3e6
Evangelink
requested review from
a team,
meaghanlewis and
nohwnd
as code owners
August 6, 2026 09:53
Contributor
There was a problem hiding this comment.
Pull request overview
Adds a new, task-oriented article that explains how to run MSTest on Microsoft.Testing.Platform (MTP) inside WinUI 3 test hosts (unpackaged and packaged full-trust), and wires that guidance into existing MSTest/MTP documentation and navigation.
Changes:
- Adds a new WinUI 3 testing guide covering deployment model choice, required project properties, self-hosted
OnLaunchedsetup, UI-thread dispatch withUITestMethod, anddotnet runworkflow. - Updates MSTest and MTP overview pages to link to the new WinUI 3 guidance and refreshes metadata.
- Updates the test-platform comparison and test-host deployment docs to clarify unpackaged WinUI support, packaged full-trust preview status, and AppContainer/UWP limitations, plus adds TOC registration.
Show a summary per file
| File | Description |
|---|---|
| docs/navigate/devops-testing/toc.yml | Adds navigation entry for the new WinUI 3 testing article. |
| docs/core/testing/unit-testing-mstest-winui.md | New end-to-end guidance for hosting and running MSTest via MTP in WinUI 3 apps (unpackaged and packaged full-trust). |
| docs/core/testing/unit-testing-mstest-running-tests.md | Adds ai-usage metadata and links to the WinUI 3 article from “See also”. |
| docs/core/testing/unit-testing-mstest-intro.md | Adds ai-usage metadata and updates platform guidance to point to the WinUI 3 article. |
| docs/core/testing/test-platforms-overview.md | Refines platform selection guidance to distinguish UWP/AppContainer, unpackaged WinUI, and packaged full-trust WinUI preview. |
| docs/core/testing/microsoft-testing-platform-test-host-deployment.md | Updates packaged-app deployment description/requirements and adds a link to the WinUI 3 article. |
| docs/core/testing/microsoft-testing-platform-intro.md | Adds ai-usage metadata and links to WinUI 3 hosting guidance from the “Start here” list. |
Copilot's findings
- Files reviewed: 7/7 changed files
- Comments generated: 1
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 7e33a7df-138b-46ef-91ef-3ebd19c4f3e6
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 7e33a7df-138b-46ef-91ef-3ebd19c4f3e6
BillWagner
approved these changes
Aug 6, 2026
BillWagner
left a comment
Member
There was a problem hiding this comment.
Thanks again @Evangelink
This LGTM, and I'll
now.
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.
Summary
Add task-oriented guidance for testing WinUI 3 apps with MSTest on Microsoft.Testing.Platform (MTP), including:
App.OnLaunchedsetup.UITestMethoddispatcher behavior, lifecycle cleanup, and exit-code propagation.dotnet runworkflow and expected outcome.UseUwp, and packaged full-trust WinUI 3.The platform comparison and test-host deployment pages now distinguish supported unpackaged WinUI from the packaged full-trust preview and from classic UWP, modern .NET UWP, and other unsupported AppContainer hosts.
Source breakdown
microsoft/testfxdocs/winui-testing.md.OnLaunchedflow: Adapted from theMSTestRunnerWinUIandMSTestRunnerWinUIUnpackagedsamples.docs/winui-testing.md, the existing MSTest platform guidance, and theBlankUwpNet9Appsample.Microsoft.Testing.Extensions.PackagedAppsource documentation and implementation.1.0.0-alpha.26377.5; the public package does not yet include Windows AUMID activation, so the article gates that setup on a future supporting preview.AI usage and expert review
Created with AI assistance under human direction. The new article narrative, decision table, troubleshooting table, UWP boundary explanation, and cross-page wording are generated/adapted content and require subject-matter expert review.
Validation
markdownlint-cli2: 0 errors.ai-usagemetadata validated.git diff --checkpassed.Remaining uncertainty
Full-trust MSIX registration and AUMID activation are implemented in the current
microsoft/testfxsource but are not present in the latest publicMicrosoft.Testing.Extensions.PackagedAppprerelease. The packaged activation path therefore couldn't be executed from a public package. The article calls out that release-state limitation and does not direct readers to install an incompatible package.Internal previews