Skip to content

Use MSTest.Sdk in packaged WinUI acceptance coverage - #10511

Merged
Amaury Levé (Evangelink) merged 1 commit into
mainfrom
dev/amauryleve/enable-uwp-mtp
Aug 9, 2026
Merged

Use MSTest.Sdk in packaged WinUI acceptance coverage#10511
Amaury Levé (Evangelink) merged 1 commit into
mainfrom
dev/amauryleve/enable-uwp-mtp

Conversation

@Evangelink

Copy link
Copy Markdown
Member

Build the real packaged WinUI acceptance asset through MSTest.Sdk instead of manually assembling the MSTest runner, framework, adapter, and packaged-app launcher. This makes the end-to-end test verify the SDK experience consumers actually use.

The asset now asserts that the SDK enables the MTP runner, suppresses the competing generated entry point for the WinUI ApplicationDefinition, emits the reusable application helper, and includes Microsoft.Testing.Extensions.PackagedApp. Its OnLaunched implementation uses that generated helper directly.

Depends on #10491. Until that PR merges, this PR temporarily includes its controller-pipe authorization commits in the diff against main.

Copilot AI balanced review requested due to automatic review settings August 7, 2026 16:05
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 9f87d322-bbca-4e55-bb3f-43bdde92cc24

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.

Pull request overview

Migrates packaged WinUI acceptance coverage to the consumer-facing MSTest.Sdk flow. It also temporarily carries #10491’s AppContainer pipe-authorization implementation, plus unrelated GitHub Actions and glossary changes.

Changes:

  • Uses the SDK-generated MTP helper and verifies resolved WinUI assets/settings.
  • Adds AppContainer SID derivation and controller-pipe authorization.
  • Adds unrelated GitHub Actions option validation and glossary entries.
Show a summary per file
File Description
test/UnitTests/Microsoft.Testing.Platform.UnitTests/IPC/NamedPipeServerSecurityTests.cs Tests pipe ACL security behavior.
test/UnitTests/Microsoft.Testing.Extensions.UnitTests/PackagedAppPipeAuthorizationTests.cs Tests packaged-app authorization decisions.
test/UnitTests/Microsoft.Testing.Extensions.UnitTests/GitHubActionsCommandLineProviderTests.cs Tests report sub-option validation.
test/UnitTests/Microsoft.Testing.Extensions.UnitTests/AppContainerSecurityIdentifierTests.cs Tests package SID derivation.
test/IntegrationTests/Microsoft.Testing.Platform.Acceptance.IntegrationTests/PackagedWinUITests.cs Migrates WinUI asset to MSTest.Sdk.
src/Platform/Microsoft.Testing.Platform/TestHostControllers/ITestHostControllerConnectionAuthorizer.cs Adds authorization extension contract.
src/Platform/Microsoft.Testing.Platform/Resources/xlf/PlatformResources.zh-Hant.xlf Adds localized resource placeholder.
src/Platform/Microsoft.Testing.Platform/Resources/xlf/PlatformResources.zh-Hans.xlf Adds localized resource placeholder.
src/Platform/Microsoft.Testing.Platform/Resources/xlf/PlatformResources.tr.xlf Adds localized resource placeholder.
src/Platform/Microsoft.Testing.Platform/Resources/xlf/PlatformResources.ru.xlf Adds localized resource placeholder.
src/Platform/Microsoft.Testing.Platform/Resources/xlf/PlatformResources.pt-BR.xlf Adds localized resource placeholder.
src/Platform/Microsoft.Testing.Platform/Resources/xlf/PlatformResources.pl.xlf Adds localized resource placeholder.
src/Platform/Microsoft.Testing.Platform/Resources/xlf/PlatformResources.ko.xlf Adds localized resource placeholder.
src/Platform/Microsoft.Testing.Platform/Resources/xlf/PlatformResources.ja.xlf Adds localized resource placeholder.
src/Platform/Microsoft.Testing.Platform/Resources/xlf/PlatformResources.it.xlf Adds localized resource placeholder.
src/Platform/Microsoft.Testing.Platform/Resources/xlf/PlatformResources.fr.xlf Adds localized resource placeholder.
src/Platform/Microsoft.Testing.Platform/Resources/xlf/PlatformResources.es.xlf Adds localized resource placeholder.
src/Platform/Microsoft.Testing.Platform/Resources/xlf/PlatformResources.de.xlf Adds localized resource placeholder.
src/Platform/Microsoft.Testing.Platform/Resources/xlf/PlatformResources.cs.xlf Adds localized resource placeholder.
src/Platform/Microsoft.Testing.Platform/Resources/PlatformResources.resx Adds invalid-identity error text.
src/Platform/Microsoft.Testing.Platform/PublicAPI/PublicAPI.Unshipped.txt Tracks the new public contract.
src/Platform/Microsoft.Testing.Platform/IPC/NamedPipeServerSecurity.cs Implements explicit Windows pipe ACLs.
src/Platform/Microsoft.Testing.Platform/IPC/NamedPipeServer.cs Accepts authorized identities.
src/Platform/Microsoft.Testing.Platform/InternalAPI/InternalAPI.Unshipped.txt Tracks new internal constructors.
src/Platform/Microsoft.Testing.Platform/Hosts/TestHostControllersTestHost.cs Requests authorization before pipe creation.
src/Platform/Microsoft.Testing.Extensions.TrxReport/InternalAPI/InternalAPI.Unshipped.txt Tracks shared IPC constructors.
src/Platform/Microsoft.Testing.Extensions.Retry/InternalAPI/InternalAPI.Unshipped.txt Tracks shared IPC constructors.
src/Platform/Microsoft.Testing.Extensions.PackagedApp/PackagedAppTestHostLauncher.cs Supplies package authorization identity.
src/Platform/Microsoft.Testing.Extensions.PackagedApp/PackagedAppExtensions.cs Documents the authorization hook.
src/Platform/Microsoft.Testing.Extensions.PackagedApp/PACKAGE.md Documents AppContainer pipe access.
src/Platform/Microsoft.Testing.Extensions.PackagedApp/Microsoft.Testing.Extensions.PackagedApp.csproj Updates package description.
src/Platform/Microsoft.Testing.Extensions.PackagedApp/InternalAPI/InternalAPI.Unshipped.txt Tracks new internal APIs.
src/Platform/Microsoft.Testing.Extensions.PackagedApp/AppxManifestInfo.cs Classifies AppContainer applications.
src/Platform/Microsoft.Testing.Extensions.PackagedApp/AppxApplicationInfo.cs Stores AppContainer classification.
src/Platform/Microsoft.Testing.Extensions.PackagedApp/AppContainerSecurityIdentifier.cs Derives package SIDs.
src/Platform/Microsoft.Testing.Extensions.MSBuild/InternalAPI.Unshipped.txt Tracks shared IPC constructors.
src/Platform/Microsoft.Testing.Extensions.HangDump/InternalAPI/InternalAPI.Unshipped.txt Tracks shared IPC constructors.
src/Platform/Microsoft.Testing.Extensions.GitHubActionsReport/Resources/xlf/GitHubActionsResources.zh-Hant.xlf Adds validation resource placeholder.
src/Platform/Microsoft.Testing.Extensions.GitHubActionsReport/Resources/xlf/GitHubActionsResources.zh-Hans.xlf Adds validation resource placeholder.
src/Platform/Microsoft.Testing.Extensions.GitHubActionsReport/Resources/xlf/GitHubActionsResources.tr.xlf Adds validation resource placeholder.
src/Platform/Microsoft.Testing.Extensions.GitHubActionsReport/Resources/xlf/GitHubActionsResources.ru.xlf Adds validation resource placeholder.
src/Platform/Microsoft.Testing.Extensions.GitHubActionsReport/Resources/xlf/GitHubActionsResources.pt-BR.xlf Adds validation resource placeholder.
src/Platform/Microsoft.Testing.Extensions.GitHubActionsReport/Resources/xlf/GitHubActionsResources.pl.xlf Adds validation resource placeholder.
src/Platform/Microsoft.Testing.Extensions.GitHubActionsReport/Resources/xlf/GitHubActionsResources.ko.xlf Adds validation resource placeholder.
src/Platform/Microsoft.Testing.Extensions.GitHubActionsReport/Resources/xlf/GitHubActionsResources.ja.xlf Adds validation resource placeholder.
src/Platform/Microsoft.Testing.Extensions.GitHubActionsReport/Resources/xlf/GitHubActionsResources.it.xlf Adds validation resource placeholder.
src/Platform/Microsoft.Testing.Extensions.GitHubActionsReport/Resources/xlf/GitHubActionsResources.fr.xlf Adds validation resource placeholder.
src/Platform/Microsoft.Testing.Extensions.GitHubActionsReport/Resources/xlf/GitHubActionsResources.es.xlf Adds validation resource placeholder.
src/Platform/Microsoft.Testing.Extensions.GitHubActionsReport/Resources/xlf/GitHubActionsResources.de.xlf Adds validation resource placeholder.
src/Platform/Microsoft.Testing.Extensions.GitHubActionsReport/Resources/xlf/GitHubActionsResources.cs.xlf Adds validation resource placeholder.
src/Platform/Microsoft.Testing.Extensions.GitHubActionsReport/Resources/GitHubActionsResources.resx Adds sub-option validation message.
src/Platform/Microsoft.Testing.Extensions.GitHubActionsReport/InternalAPI/InternalAPI.Unshipped.txt Tracks validation override.
src/Platform/Microsoft.Testing.Extensions.GitHubActionsReport/GitHubActionsCommandLineProvider.cs Validates report sub-options.
docs/winui-testing.md Documents AppContainer communication support.
docs/RFCs/017-TestHost-Launcher.md Documents authorization contract and ACL.
docs/glossary.md Updates PackagedApp and Server Mode entries.

Review details

  • Files reviewed: 14/87 changed files
  • Comments generated: 3
  • Review effort level: Balanced

Comment thread docs/glossary.md
Copilot AI review requested due to automatic review settings August 7, 2026 16:14
@Evangelink
Amaury Levé (Evangelink) force-pushed the dev/amauryleve/enable-uwp-mtp branch from 1259bea to 36128a0 Compare August 7, 2026 16:14

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.

Review details

  • Files reviewed: 1/1 changed files
  • Comments generated: 0 new
  • Review effort level: Balanced

@github-actions

github-actions Bot commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

🧪 Expert test review — PR #10511

GradeTestMutationNotesHow to improve
A (90–100) mod PackagedWinUITests.
PackagedFullTrustWinUI_
RegistersActivatesConnectsBackRunsUiTestsAndCleansUp
N/A (acceptance/infra test) Diff only drops an obsolete PatchCodeWithReplace call and tightens AssertResolvedWinUIAssets with five precise, string-exact checks (UsingMSTestSdk, EnableMSTestRunner, GenerateTestingPlatformEntryPoint, GenerateTestingPlatformApplicationHelper, EnableMicrosoftTestingExtensionsPackagedApp) that correctly verify the MSTest.Sdk-based project now resolves the intended MSBuild properties; identity, execution, registration, and cleanup assertions are unchanged and remain sound.

Only one changed test method fell inside the diff's changed line ranges; the other touched regions (the embedded .csproj/.xaml.cs template source strings and the AssertResolvedWinUIAssets/AssertFullTrustGeneratedManifest helper methods) are generated test-asset source or non-[TestMethod] helpers, so they were excluded per the review scope.

This advisory comment was generated automatically. Grades are heuristic
and informational — they do not block merging. Suggestions on the Files
changed tab can be applied with one click. Re-run with
/review-tests.

🤖 Automated content by GitHub Copilot. Generated by the Test Reviewer on PR (on open / sync) workflow. · auto · 75.5 AIC · ⌖ 4.02 AIC · ⊞ 16.9K · [◷]( · )

@github-actions

github-actions Bot commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

🧵 Parallel-safety audit — PR #10511

Nothing audited here touches process-global state, shared filesystem paths, or
[ResourceLock] / [DoNotParallelize] declarations. Nothing to flag for
parallel-safety.

The single changed test file (test/IntegrationTests/Microsoft.Testing.Platform.Acceptance.IntegrationTests/PackagedWinUITests.cs) already carries a pre-existing, unchanged [DoNotParallelize] on PackagedWinUITests, and this PR's diff only touches: a doc comment, one dropped PatchCodeWithReplace call, additional Assert.Contains assertions on the resolved-assets report, and the embedded csproj/target/UnitTestApp.xaml.cs source template (switching the generated sample project from raw SDK + explicit package references to MSTest.Sdk, and from the TestApplication builder pattern to MicrosoftTestingPlatformApplication.RunAsync). All file paths used (testAsset.TargetAssetPath, resolved-mstest-assets.txt, marker files) remain per-test-unique generated-asset paths, no env vars/CWD/culture/console/static mutation was added or removed, and no [ResourceLock]/[Parallelize]/[DoNotParallelize] declaration changed. No .runsettings/testconfig.json/build-config files were touched by this PR.

Audited Microsoft.Testing.Platform.Acceptance.IntegrationTests at scope MethodLevel (assembly-level [assembly: Parallelize(Scope = ExecutionScope.MethodLevel, Workers = 0)] in Program.cs, unchanged by this PR), workers CPU count. The changed class itself is deferred via its pre-existing [DoNotParallelize].

Re-run with /parallel-audit.

🤖 Automated content by GitHub Copilot. Generated by the Parallel-safety audit on PR (on open / sync) workflow. · auto · 89 AIC · ⌖ 4.65 AIC · ⊞ 24.8K · [◷]( · )

@Evangelink
Amaury Levé (Evangelink) enabled auto-merge (squash) August 9, 2026 17:42
@Evangelink Amaury Levé (Evangelink) added the state/needs-review Awaiting review from the team. label Aug 9, 2026
@Evangelink
Amaury Levé (Evangelink) merged commit 9325a0d into main Aug 9, 2026
54 checks passed
@Evangelink
Amaury Levé (Evangelink) deleted the dev/amauryleve/enable-uwp-mtp branch August 9, 2026 17:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

state/needs-review Awaiting review from the team.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants