Skip to content

Simplify the MSTest.TestAdapter UWP package layout - #12615

Merged
Amaury Levé (Evangelink) merged 4 commits into
mainfrom
dev/amauryleve/adapter-lib-layout-simplify
Nov 25, 2026
Merged

Amaury Levé (Evangelink) merged 4 commits into
mainfrom
dev/amauryleve/adapter-lib-layout-simplify

Conversation

@Evangelink

@Evangelink Amaury Levé (Evangelink) commented Nov 24, 2026 •

Copy link
Copy Markdown
Member

Agent assessment

Self-reported assessment, not an independent review.

Assessed revision: 7402e6902d1aeb4a67060d94f1ea46c847644708

Dimension Assessment Rationale
Change confidence 7.5/10 ↑ Three packaged classic UWP consumer cases and four non-SDK policy regression cases ran.
↑ Native Bazel packages and both portable consumers passed after the packaging fix.
↓ WinUI runtime, real UWP packages.config AppX behavior, and original-layout paired evidence remain unverified.

Pull request

Summary

Simplify the MSTest.TestAdapter package layout: place the Windows net10 adapter directly under buildTransitive/net10.0/, and ship the classic UWP adapter DLLs and satellites as ordinary lib/uap10.0.16299/ assets. UWP props and targets continue to handle AppX deployment and culture filtering. Shared non-SDK asset policy preserves adapter and resource opt-outs, and restores missing adapter references on packages.config upgrades.

Design and decision record

See Classic UWP adapter in lib and flat UI payload and the non-SDK review follow-up. This avoids a separate adapter payload for a NuGet-recognized TFM while keeping the portable and Windows-specific net10 builds separate. Classic UWP now receives compile references to the adapter and platform-services DLLs; previously it did not.

Demonstration

This changes package assets rather than a rendered UI, so a text description is clearer than screenshots. The Debug package was inspected after packing; the classic UWP acceptance cases below exercised real AppX consumers through MTP.

Validation and regression proof

  • .\build.cmd -pack produced the Debug packages. The initial package-shape check reported the expected layout drift; .\eng\verify-nupkgs.ps1 -configuration Debug -updateBaselines regenerated the adapter baseline and the shape validation passed.
  • With DOTNET_ROOT set to the repo-local .dotnet and TESTFX_RUN_WINDOWS_APP_MODEL_TESTS=1, ran & .\artifacts\bin\MSTest.Acceptance.IntegrationTests\Debug\net12.0\MSTest.Acceptance.IntegrationTests.exe --output Detailed --filter "FullyQualifiedName~.ClassicUwpTests.": exit 0, 3 passed, 0 failed, 0 skipped. The three ClassicUwp_ConsumesUapAssets_AndRunsPlainAndUiTestsThroughMtp cases covered MSTest, MSTest.Sdk, and MSTest.TestAdapter at 26ece8e11f43cbda7fae107528bf669f9a33592b. The temporary run log was removed.
  • After the non-SDK fix, .\build.cmd -pack -projects src\MSTest\MSTest.TestAdapter\MSTest.TestAdapter.csproj -bl and .\build.cmd -projects test\IntegrationTests\MSTest.Acceptance.IntegrationTests\MSTest.Acceptance.IntegrationTests.csproj -bl passed. The focused acceptance selection passed 32 tests with no skips. With the repo-local SDK on PATH, artifacts\bin\MSTest.Acceptance.IntegrationTests\Debug\net12.0\MSTest.Acceptance.IntegrationTests.exe --filter 'FullyQualifiedName~ClassicUwpNonSdkAssetPolicy_FiltersResolvedAdapterAssets' --report-trx --results-directory artifacts\TestResults\uwp-policy-green3 exited 0 with all four cases passed and none skipped. These runs used the final source tree before commit.
  • A real non-SDK UWP PackageReference probe restored the repacked adapter, resolved only the requested French adapter satellites, and built an unsigned native x64 MSIX. Its separate opt-out checks inspect resolved items, not packaged execution; the native MSIX was not run. Commands, package hashes, and the isolated red/green evidence are in the decision record.
  • Native Bazel package regression: pwsh -NoLogo -NoProfile -File .\eng\bazel\validate-mstest-packages.ps1 -OutputRoot artifacts\bazel-mstest-review-red built the pre-fix native package but exited 1 on the new missing-helper assertion. With the package mapping added, the same command using -OutputRoot artifacts\bazel-mstest-review-green exited 0: both net10.0 and net11.0 consumers passed NativeAssembliesAreLoadedFromConsumer, KoreanSatellitesAreCopiedAndLoadable, and PackagedTargetsProvideCoreAndParallelization; intentional failure and zero-result exit checks also passed. The net11 MSBuild driver passed the same three cases and its intentional-failure check. See the decision record for provenance.
  • The full affected acceptance selection was not confirmed after the final test-helper correction. MTP PackagedWinUITests built the WinUI projects, but four native cases required TESTFX_DOTNET_10_PATH and four controller cases failed loading Microsoft.CodeCoverage.Instrumentation.Core; WinUI runtime behavior remains unverified locally.
  • A real classic UWP packages.config AppX upgrade and VSTest satellite-duplication behavior remain unverified. A desktop UI automation case also hung locally.

Test-value evidence

Base: d54b8f105d51cabcdc3b21ef657c9e9cb822999f; head: 7402e6902d1aeb4a67060d94f1ea46c847644708.

Contract / case Counterfactual Without change With change Evidence / gap
Classic UWP asset resolution and execution / ClassicUwp_ConsumesUapAssets_AndRunsPlainAndUiTestsThroughMtp Retain the updated tests and restore the old package layout Unverified: no isolated paired run Executed: 3 passed at 26ece8e11f43cbda7fae107528bf669f9a33592b Real packaged consumers ran; sensitivity and baseline equivalence remain unproven for the final head.
Flat net10 UI adapter payload / PackedMSTestTestAdapter_ShipsUIAdaptersOutsideLib and PackagedWinUITests Restore the ui/ payload directory Unverified: no isolated paired run Package layout inspected; WinUI runtime cases incomplete Complete the WinUI runtime cases in CI and establish paired evidence if needed.
Non-SDK UWP asset policy / ClassicUwpNonSdkAssetPolicy_FiltersResolvedAdapterAssets Same tests and host against reconstructed pre-fix adapter package Executed: 4 assertion failures, 0 skipped Executed: 4 passed, 0 skipped Item-level regression proof; actual packages.config AppX and runtime satellite loading remain unverified.
Native Bazel package helper / Assert-PackageLayout Retain the validator assertion with the pre-fix file mapping Executed: missing net10.0 helper assertion failed Executed: both TFM entries verified and real net10.0/net11.0 consumers passed The native adapter package is experimental and excludes UI payloads.

Move the classic UWP adapter DLLs and satellites to lib/uap10.0.16299 and
the Windows UWP/WinUI adapter build from buildTransitive/net10.0/ui to
buildTransitive/net10.0.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot AI balanced review requested due to automatic review settings November 24, 2026 21:56
@github-actions github-actions Bot added the state/needs-review Awaiting review from the team. label Nov 24, 2026
@microsoft-github-policy-service microsoft-github-policy-service Bot added state/needs-review Awaiting review from the team. and removed state/needs-review Awaiting review from the team. labels Nov 24, 2026
@github-actions github-actions Bot added state/approved Proposal approved; ready for implementation. and removed state/needs-review Awaiting review from the team. labels Nov 24, 2026

@github-actions github-actions Bot 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.

🧪 Test quality review — PR #12615

Compared merge base d54b8f105d51cabcdc3b21ef657c9e9cb822999f with head 26ece8e11f43cbda7fae107528bf669f9a33592b. Evidence applies to this head, not every intermediate commit. This was a static review only; no builds or tests were run.

Test-value evidence

Contract Test coverage Evidence
Modern UI adapter payload moves from buildTransitive/net10.0/ui/ to buildTransitive/net10.0/. CoreFrameworkAssemblyTests, WindowsApplicationModelPackageTests, PackagedWinUITests and the SdkTests.Composition path expectations assert the new folder. Static prediction: the old /ui/ layout would fail these path assertions. Not executed.
Classic UWP adapter moves from buildTransitive/uap10.0/ to lib/uap10.0.16299/. Package-shape, lib and _localization assertions and the WindowsApplicationModelTestTools patterns were updated. Static prediction: the old layout fails these assertions. Not executed.
Build-asset .props/.targets, csproj and package-shape file changes. Covered only indirectly, through the packed-package assertions above. Unverified: no revision-matched execution records are accessible.
Decision doc and PACKAGE.md changes. Documentation only. Not applicable.

Executed red-green proof for these cases is unavailable. Running the packed acceptance tests on Windows against both revisions would supply it.

🧵 Parallel safety

STATUS: PARTIAL. The specialist was not run for this review. The changes are string and path updates in existing acceptance tests, with no new shared state and no parallelization configuration (config_count is 0). Do not read this as a clean result.

Per-test assessment

Pseudo-mutation evidence is not reported. The changed lines are path-string expectations, and no meaningful static mutations were assessed.

Result Quality Test Notes Follow-up
Pass — mod CoreFrameworkAssemblyTests.PackedConsumersUseSharedCoreAndSelectedUiPayload Only the expected UI payload folder changed. No change justified: the paths match the new package layout.
Pass — mod WindowsApplicationModelPackageTests (changed methods and helpers) Path expectations match the new lib/uap10.0.16299 and buildTransitive/net10.0 layout. No change justified.
Pass — mod SdkTests.Composition (changed lines) The UI adapter directory expectation was updated consistently. No change justified.
Pass — mod WindowsApplicationModelTestTools (helper patterns) and PackagedWinUITests The regexes and expected paths agree with the new layout. No change justified.

No letter grades were assigned. I did not run the full per-test grading rubric (the grade-tests skill) on each method, and the rows above are a bounded static read.

No inline comments were published.

<sub>This advisory review is heuristic and non-blocking.

Re-run the combined review with /review-tests, or only the parallel-safety specialist with /parallel-audit.</sub>

🤖 Automated content by GitHub Copilot. Generated by the Test Quality Review on PR (on open / sync) workflow. · copilot · auto (Claude Sonnet 5.5) · ~31 AIC · ⌖ ~2 AIC · ⊞ 8.5K

@microsoft-github-policy-service microsoft-github-policy-service Bot added the state/needs-review Awaiting review from the team. label Nov 24, 2026
@github-actions github-actions Bot added state/approved Proposal approved; ready for implementation. and removed state/needs-review Awaiting review from the team. state/approved Proposal approved; ready for implementation. labels Nov 24, 2026

@github-actions github-actions Bot 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.

Note

🤖 Automated review by GitHub Copilot. Generated by the Expert Code Review workflow. To request a follow-up action, reply by tagging @copilot directly.

Scope reviewed: MSBuild/NuGet package layout, UWP targets and props, package-shape baseline, acceptance tests, and the decision record. I read 10 of the 12 changed files. The get_files page size is capped at 10, so the last two were not read.

No confirmed defects. The points below are open risks or evidence gaps.

  1. Compile surface for classic UWP. lib/uap10.0.16299/ now produces a <references> group, so classic UWP consumers get compile references to MSTest.TestAdapter.dll and MSTestAdapter.PlatformServices.dll. The decision record accepts this and the nuspec test asserts it. It is still a consumer-visible change for anyone with a type-name clash or analyzers over references. Please call it out in release notes.

  2. Non-SDK (packages.config) classic UWP. The PR states this was not exercised. Satellites now come from NuGet's lib/<tfm>/<culture> handling, and the culture-policy Content items also copy them from lib/uap10.0.16299/. This can give duplicate-content or deployment conflicts. The adapter DLLs are also added as AppX Content for non-SDK projects, which already receive them as references. Before merge, either exercise one non-SDK case or confirm the targets' ReferencePath branch skips the duplicates.

  3. Test-value evidence. The table says "Unverified: no isolated paired run" for both contracts. The structural assertions look sensitive: PackedMSTestTestAdapter_ShipsUIAdaptersOutsideLib, the nuspec references, and the lib/uap10.0.16299 entry list would all fail on the old layout. That is a static prediction, not executed red-phase proof. The WinUI runtime cases (PackagedWinUITests) were not run locally, so CI on the head commit is the only evidence for the flat buildTransitive/net10.0/ payload.

  4. Flat net10 payload collision risk. buildTransitive/net10.0/*.dll is now a sibling of the props and targets that NuGet auto-imports. The lib/net10.0 and buildTransitive/net10.0 builds share file names but live in different folders, and _MSTestSelectUIAdapterAssets swaps them explicitly. I found no problem. The updated DoesNotContain guard in PackedMSTestTestAdapter_ShipsUIAdaptersOutsideLib allowlists exactly the two DLLs, so a future stray DLL in buildTransitive is still caught.

  5. Nits.

    • src/MSTest/MSTest.TestAdapter/buildTransitive/uwp/MSTest.TestAdapter.targets now has a double blank line where the <ItemGroup> was removed.
    • src/MSTest/MSTest.TestAdapter/MSTest.TestAdapter.csproj shows a first-line change (<Project>), which looks like a BOM toggle. Please confirm it is intentional.
    • The decision record ends without a trailing newline.

Not verified: a rebuild or verify-nupkgs run, and the two unread files.

@microsoft-github-policy-service microsoft-github-policy-service Bot added the state/needs-review Awaiting review from the team. label Nov 24, 2026

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.

🟡 Changes recommended

The directory glob clears satellite culture metadata and breaks language filtering, while moving assets into lib bypasses adapter and resource opt-outs for non-SDK UWP consumers.

2 open issues
What changed in this PR

This PR simplifies MSTest.TestAdapter’s Windows package layout while retaining separate portable and Windows-specific adapter builds.

Changes:

  • Moves classic UWP assemblies and satellites into lib/uap10.0.16299/.
  • Flattens the modern UWP/WinUI adapter payload into buildTransitive/net10.0/ and updates asset selection.
  • Updates package baselines, acceptance expectations, and layout documentation.

Test-value evidence: For head 26ece8e11f43cbda7fae107528bf669f9a33592b, the PR reports three passing classic UWP consumer cases. Paired baseline evidence, WinUI runtime validation, and non-SDK compatibility remain incomplete. This review used static inspection; no builds or tests were run.

File Description
test/​IntegrationTests/​MSTest.Acceptance.IntegrationTests/​WindowsApplicationModelTestTools.cs Updates expected resolved adapter paths.
test/​IntegrationTests/​MSTest.Acceptance.IntegrationTests/​WindowsApplicationModelPackageTests.cs Updates package layout and reference assertions.
test/​IntegrationTests/​MSTest.Acceptance.IntegrationTests/​SdkTests.Composition.cs Aligns SDK composition checks with relocated assets.
test/​IntegrationTests/​MSTest.Acceptance.IntegrationTests/​CoreFrameworkAssemblyTests.cs Updates modern UI assembly lookup paths.
test/​IntegrationTests/​Microsoft.Testing.Platform.Acceptance.IntegrationTests/​PackagedWinUITests.cs Updates packaged WinUI adapter expectations.
src/​MSTest/​MSTest.TestAdapter/​PACKAGE.md Documents the revised consumer asset layout.
src/​MSTest/​MSTest.TestAdapter/​MSTest.TestAdapter.csproj Relocates packed UWP and modern UI assemblies.
src/​MSTest/​MSTest.TestAdapter/​buildTransitive/​uwp/​MSTest.TestAdapter.targets Uses NuGet references and adjusts deployment and satellite selection.
src/​MSTest/​MSTest.TestAdapter/​buildTransitive/​uwp/​MSTest.TestAdapter.props Points localization lookup at the UWP lib directory.
src/​MSTest/​MSTest.TestAdapter/​buildTransitive/​common/​MSTest.TestAdapter.targets Selects the flattened modern UI payload.
eng/​package-shapes/​MSTest.TestAdapter.txt Records the revised package contents.
docs/​decisions/​mstest-adapter-lib-assets.md Records layout decisions, consequences, and validation gaps.

Review effort: Balanced

@microsoft-github-policy-service microsoft-github-policy-service Bot added state/needs-review Awaiting review from the team. and removed state/needs-review Awaiting review from the team. labels Nov 24, 2026
@github-actions github-actions Bot added state/approved Proposal approved; ready for implementation. and removed state/needs-review Awaiting review from the team. state/approved Proposal approved; ready for implementation. labels Nov 24, 2026
@microsoft-github-policy-service microsoft-github-policy-service Bot added the state/needs-review Awaiting review from the team. label Nov 24, 2026
@github-actions github-actions Bot added state/approved Proposal approved; ready for implementation. and removed state/needs-review Awaiting review from the team. state/approved Proposal approved; ready for implementation. labels Nov 24, 2026
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot AI balanced review requested due to automatic review settings November 24, 2026 22:15
@github-actions github-actions Bot added state/approved Proposal approved; ready for implementation. and removed state/approved Proposal approved; ready for implementation. labels Nov 24, 2026
@github-actions github-actions Bot added the state/approved Proposal approved; ready for implementation. label Nov 24, 2026
@microsoft-github-policy-service microsoft-github-policy-service Bot added the state/needs-review Awaiting review from the team. label Nov 24, 2026
@github-actions github-actions Bot added state/approved Proposal approved; ready for implementation. and removed state/needs-review Awaiting review from the team. state/approved Proposal approved; ready for implementation. labels Nov 24, 2026
@microsoft-github-policy-service microsoft-github-policy-service Bot added state/needs-review Awaiting review from the team. and removed state/needs-review Awaiting review from the team. labels Nov 24, 2026
@github-actions github-actions Bot added state/approved Proposal approved; ready for implementation. and removed state/needs-review Awaiting review from the team. state/approved Proposal approved; ready for implementation. labels Nov 24, 2026
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot AI balanced review requested due to automatic review settings November 24, 2026 23:10
@github-actions github-actions Bot added state/approved Proposal approved; ready for implementation. and removed state/approved Proposal approved; ready for implementation. labels Nov 24, 2026
@microsoft-github-policy-service microsoft-github-policy-service Bot added the state/needs-review Awaiting review from the team. label Nov 24, 2026
@github-actions github-actions Bot added state/approved Proposal approved; ready for implementation. and removed state/needs-review Awaiting review from the team. state/approved Proposal approved; ready for implementation. labels Nov 24, 2026

@github-actions github-actions Bot 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.

🧪 Test quality review — PR #12615

Compared merge base d54b8f105d51cabcdc3b21ef657c9e9cb822999f with head 7402e6902d1aeb4a67060d94f1ea46c847644708. Evidence applies to this head, not every intermediate commit.

Test-value evidence

All results are static predictions. No paired execution records were accessible.

Contract Test / data case Decisive assertion Counterfactual Status
Classic UWP non-SDK asset policy filters adapter assets (test app, resources off, non-test app, fr satellites). PackagesConfigUpgradeTests.ClassicUwpNonSdkAssetPolicy_FiltersResolvedAdapterAssets (4 DataRows) Assert.AreSequenceEqual(expected, actual) on Copy|Satellite lines If the policy keeps ja satellites or ignores IsTestApplication, the sequences differ. Likely detected (static prediction)
Upgraded packages.config project without adapter references gets them added. UpgradedPackagesConfig DataRow, plus the Reference injection in AssetPolicy.targets The expected Copy lines for the adapter DLLs If the reference-injection target is dropped, the DLL lines are missing. Likely detected (static prediction)
Package shape, Bazel and docs changes. — — Non-executable, or covered by the package-shape validation. Not applicable
Renamed or adjusted assertions in the other changed tests (CoreFrameworkAssemblyTests, SdkTests.Composition, WindowsApplicationModel*, PackagedWinUITests). Existing tests — Small expectation updates, so green is expected before and after. Unverified: not executed

The new test needs Visual Studio MSBuild and calls Assert.Inconclusive when it is unavailable. It would therefore not exercise the contract on Linux or macOS CI agents. I did not confirm which CI legs run it.

🧵 Parallel safety

STATUS: PARTIAL. The parallel-safety specialist was not run, so coverage is incomplete and this must not be read as clean. By inspection, the new test uses a unique asset name per DataRow (ClassicUwpNonSdkPolicy{scenario}) and a per-asset binlog and report path, so I saw no shared-path hazard.

Per-test assessment

Pseudo-mutation evidence below consists of static predictions, not executed mutation results.

Result Quality Test Notes Follow-up
Pass B (80–89) new PackagesConfigUpgradeTests.ClassicUwpNonSdkAssetPolicy_FiltersResolvedAdapterAssets An exact sequence assertion covers copy and satellite output for 4 scenarios. No change justified: the exact sequence comparison covers the claimed contract. The Inconclusive skip is an environment limit, not a defect.
Uncertain — mod CoreFrameworkAssemblyTests, SdkTests.Composition, WindowsApplicationModelPackageTests, WindowsApplicationModelTestTools, PackagedWinUITests The changes are small edits, and I did not individually resolve or grade each method. Not graded individually. I withheld inline requests because no concrete defect was established.

<sub>This advisory review is heuristic and non-blocking.

Re-run the combined review with /review-tests, or only the parallel-safety specialist with /parallel-audit.</sub>

🤖 Automated content by GitHub Copilot. Generated by the Test Quality Review on PR (on open / sync) workflow. · copilot · auto (Claude Sonnet 5.5) · ~33 AIC · ⌖ ~2 AIC · ⊞ 8.5K

@microsoft-github-policy-service microsoft-github-policy-service Bot added the state/needs-review Awaiting review from the team. label Nov 24, 2026
@github-actions github-actions Bot added state/approved Proposal approved; ready for implementation. and removed state/needs-review Awaiting review from the team. state/approved Proposal approved; ready for implementation. labels Nov 24, 2026

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.

🔵 Needs a closer look

Human assessment is needed because an unpublished finding identifies a compatibility rationale that incorrectly portrays existing adapter compile references as newly introduced.

No open issues 🎉

1 resolved since last review

Review effort: Balanced

@Evangelink
Amaury Levé (Evangelink) merged commit 230664d into main Nov 25, 2026
41 of 42 checks passed
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.

3 participants