microsoft/microsoft-ui-xaml/test-suite-setup

Claude Code and agent skill by microsoft/microsoft-ui-xaml

Trust tier 4
  • vendor
Source check pending

Checking that the SKILL.md file is still in the repository.

Complete end-to-end setup and execution of the WinUI3 test suite locally. Delegates building to the build skill, then handles test payload creation, machine setup, and running all tests.

Install

npx vskill@latest install microsoft/microsoft-ui-xaml/test-suite-setup

SKILL.md

The same SKILL.md was published earlier as microsoft/microsoft-ui-xaml/test-suite-setup.

WinUI3 Full Test Suite Setup & Execution

This skill performs a complete end-to-end test run of the WinUI3 repository on the local machine. It covers every step from environment initialization through running all ~8000 tests.

AI Agent Instructions

When something goes wrong, read these first. This skill has accumulated reference material later in this document that will save hours of debugging:
- HRESULT Decoder Table — every crash code we've seen (0xC0000602, 0x8007007E, 0x80000003, etc.) with cause + first fix.
- OSS Package Coherence — symptom: cascading combase crashes / >10% External failures. Root cause is almost always an incoherent OSS-pinned package set, not your code.
- CI Test Invocation Map — what hosting mode each CI work item uses. Critical: Managed tests run with /p:HostingMode=WPF, not AppX. Missing this flag will look like "all 700+ Managed tests blocked" when nothing is actually broken.
- Baseline Failure Catalog — methodology for "is this my bug or pre-existing?" before treating any failure as a regression.
- ADO ↔ GitHub Mirror Reference — which clone to edit when the file exists in both.

When this skill is invoked:

  1. First, ensure the environment is ready — check if TestPayload exists and is populated. If not, invoke the `build` skill to initialize and build the repo (product + tests), then run Steps 3-5 below (create payload, machine setup, install runtimes).

> Platform/configuration: The default flavor is x64 Debug (amd64chk). If the user requests a different architecture (e.g., arm64) or configuration (fre/release), pass the appropriate flags to the build skill and adjust -Platform/-Configuration in all subsequent steps. Supported platforms: x86, x64, arm64, arm64ec. Supported configurations: chk (debug), fre (release).

  1. Determine the comparison branch, then analyze changed files to suggest relevant tests.

Branch detection logic (in order):

  1. If the user explicitly specified a branch (e.g., "compare against release/2.8"), use that.
  2. Try to auto-detect the PR target branch:

``powershell git --no-pager config --get "branch.$(git branch --show-current).merge" 2>$null ``

  1. If the current branch name suggests a release/servicing target (matches release/*, servicing/*, hotfix/*), ask the user via ask_user:

> "Your branch appears to target a release branch. Which branch should I compare against?" > Choices: detected release branch, main, "Let me specify"

  1. Default to main.

Get changed files: ``powershell git --no-pager diff --name-only <comparison-branch>...HEAD ` If the comparison branch is not available locally, fetch it first: `powershell git fetch origin <comparison-branch> git --no-pager diff --name-only origin/<comparison-branch>...HEAD ` If that also fails, fall back to: `powershell git --no-pager diff --name-only HEAD~5..HEAD ``

  1. Map changed files to test suites using a hybrid approach: known mappings first, then dynamic discovery for anything new, and a user fallback for unmatched files.

### Step 3a: Known mappings (fast path)

These curated rules cover the most common source → test relationships:

Changed files matchRecommended test DLLsHosting Mode
dxaml/xcp/core/**, dxaml/xcp/dxaml/**External.Foundation, External.Framework, External.ControlsWPF
dxaml/xcp/components/imaging/**Isolated.Foundation.ImagingNone
dxaml/xcp/components/text/**External.Foundation (text tests), Isolated.TextWPF / None
dxaml/xcp/components/focus/**Isolated.Xaml.Focus.*None
dxaml/xcp/components/accesskeys/**Isolated.AccessKeys.*None
dxaml/test/native/external/foundation/**External.FoundationWPF
dxaml/test/native/external/framework/**External.FrameworkWPF
dxaml/test/native/external/controls/**External.ControlsWPF
dxaml/test/native/external/automation/**External.AutomationWPF
dxaml/test/native/external/enterprise/**External.EnterpriseWPF
dxaml/test/native/external/win32/**External.Win32WPF
dxaml/test/native/external/activation/**External.ActivationWPF
dxaml/test/native/external/tools/**External.ToolsWPF
dxaml/test/resources/** (images, GIFs, masters)Isolated.Foundation.Imaging, External.FoundationNone / WPF
dxaml/test/managed/**Managed.*WPF
controls/dev/** (WinUI controls source)MUXControls.Test.dll, External.ControlsNone / WPF
controls/test/**MUXControls.Test.dllNone
controls/idl/**MUXControls.Test.dll, External.ControlsNone / WPF
src/XamlCompiler/**Isolated.Tools.XbfGeneratorNone
dxaml/xcp/dxaml/themes/**External.Controls, External.FrameworkWPF
Samples/**ScenarioTestSuite (sample app tests, separate payload)N/A
build/**, eng/**, packaging/**No functional tests needed (build/infra only)N/A
Only .md, .txt, config filesNo tests neededN/A

### Step 3b: Dynamic discovery (for new/unknown test areas)

For any changed files that don't match the known mappings above, dynamically discover matching tests:

  1. Scan available test DLLs in the TestPayload:

``powershell Get-ChildItem "<repo-root>\TestPayload\x64chk\Test\Microsoft.UI.Xaml.Tests.*.dll" | Select-Object -ExpandProperty Name ``

  1. Match by naming convention — extract keywords from the changed file path and look for test DLLs with matching names:
  • Changed dxaml/xcp/components/<area>/** → look for *Isolated.<Area>* or *External.<Area>*
  • Changed dxaml/test/native/external/<area>/** → match *External.<Area>*
  • Changed dxaml/test/native/isolated/<area>/** → match *Isolated.<Area>*
  • Changed controls/dev/<ControlName>/** → match *MUXControls* and *<ControlName>*
  1. Use TAEF metadata for fine-grained matching when the DLL is found but you want to narrow to specific tests:

``powershell .\te.exe Test\<matched-dll> /list /select:"@Name='*<keyword>*'" `` This confirms the DLL actually contains tests related to the changed area.

### Step 3c: User fallback (for unresolvable changes)

If any changed files still can't be mapped after Steps 3a and 3b, ask the user via ask_user: > "I found changes in <path> but couldn't auto-detect the relevant tests. Which test suite covers this area?" > Choices: list of all discovered test DLLs + "Skip — no tests needed" + "Let me specify"

If no source code files changed (only docs, config, build scripts), tell the user no functional tests are needed.

If changes span multiple areas, union all the recommended test DLLs from Steps 3a, 3b, and 3c.

  1. Present the recommendation using ask_user. Show:
  • The files that changed (summarized)
  • The recommended test suites based on the mapping
  • Choices: Run recommended tests (Recommended), Choose different tests, Run all tests

If user picks "Choose different tests", dynamically list all available test DLLs from the TestPayload: ``powershell Get-ChildItem "<repo-root>\TestPayload\x64chk\Test\Microsoft.UI.Xaml.Tests.*.dll" | ForEach-Object { $_.BaseName -replace '^Microsoft\.UI\.Xaml\.Tests\.', '' } `` Present each discovered suite as a choice, plus:

  • All Tests (all hosting modes) — runs everything
  • Custom query — let user specify a wildcard pattern like *CommandBar*

Hosting mode inference for dynamically discovered DLLs:

  • DLL name contains External. → WPF
  • DLL name contains Isolated. → None
  • DLL name contains Managed. → WPF
  • MUXControls.Test.dll, UnitTests.dll → None
  • Unknown → ask user or try without hosting mode
  1. Run the selected tests using te.exe directly for specific DLLs (more precise than runtests.cmd):

```powershell cd <repo-root>\TestPayload\x64chk

# For a specific test DLL (preferred for targeted runs): .\te.exe Test\Microsoft.UI.Xaml.Tests.Isolated.Foundation.Imaging.dll /p:SkipConsoleWindowMinimize

# For External.* with WPF hosting: .\te.exe Test\Microsoft.UI.Xaml.Tests.External.Controls.dll /p:SkipConsoleWindowMinimize /p:HostingMode=WPF

# For Managed.* with WPF hosting: .\te.exe Test\Microsoft.UI.Xaml.Tests.Managed.Controls.dll /p:SkipConsoleWindowMinimize /p:HostingMode=WPF

# For multiple DLLs at once: .\te.exe Test\Microsoft.UI.Xaml.Tests.Isolated.Foundation.Imaging.dll Test\Microsoft.UI.Xaml.Tests.External.Foundation.dll /p:SkipConsoleWindowMinimize

# Using runtests.cmd with wildcard (runs across all DLLs): .\runtests.cmd AnimatedImage -HostingMode:WPF

# For ALL tests — run each hosting mode separately: .\runtests.cmd -HostingMode:UAP .\runtests.cmd -HostingMode:WPF .\runtests.cmd -HostingMode:Win32Explicit .\runtests.cmd -HostingMode:None ```

  1. After tests complete, provide a detailed results summary. Parse the TAEF output and present:

Required summary format:

  • A results table per test suite with columns: Total, Passed, Failed, Blocked, Skipped
  • For each failed test: the full test name, the failure reason (e.g., assertion message, HRESULT, CRC mismatch), and the source file/line if available
  • For each blocked test: the full test name and the blocking reason (e.g., missing privileges, missing Te.Service, test marked Ignore)
  • An overall verdict: whether the changes are safe (no new failures) or need attention
  • Actionable next steps for any failures or blocked tests (e.g., "run from admin prompt", "update master image", "pre-existing failure unrelated to your changes")

How to extract failure details: Search the TAEF output for lines containing [Failed], [Blocked], Error:, Verify: (failed assertions), and Summary:. Use Select-String or Select-Object -Last to find relevant lines. For each failed test, look for the lines between StartGroup: <testname> and EndGroup: <testname> [Failed] to capture the full failure context.

Example summary:

``` ### Test Results: Isolated.Foundation.Imaging

TotalPassedFailedBlockedSkipped
3938100

#### Failed Tests

  1. DecodingUnitTests::Jpeg
  • Reason: CRC mismatch (Expected 0x5fd3ea9b, Actual 0xda5a7f30)
  • Source: DecodingUnitTests.cpp, Line 111
  • Action: Pre-existing environment-specific failure, unrelated to your changes. Can be ignored.

#### Blocked Tests (None)

### Overall Verdict ✅ Your changes did not introduce any new test failures. ```

Classify failures as:

  • New failure (likely caused by the current changes) — needs investigation
  • Pre-existing failure (exists on main branch too) — note it but don't block
  • Environment-specific (CRC mismatch, timing, machine config) — suggest rerun or admin prompt

If any tests are blocked due to missing admin privileges or Te.Service, provide the exact command to rerun them from an elevated prompt.

Hosting mode rules:

  • External.* tests → use /p:HostingMode=WPF for local runs (UAP requires full UWP container)
  • Isolated.* tests → no hosting mode needed (unit tests, no UI)
  • Managed.* tests → use /p:HostingMode=WPF (C# tests only work in WPF mode)
  • MUXControls.Test.dll / UnitTests.dll → no hosting mode needed
  • When user selects "All Tests", run all 4 hosting modes sequentially

Prerequisites

This is the start of the file. Read the full SKILL.md on GitHub.

Security

  • Security scanPassed, 100 of 100Pattern checks on the skill's files. Certified 1 Nov 2026.
  • Model reviewPassed

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

Repository stars
8,484
Repository forks
950
7-day trend score
45

Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill CERTIFIED badge
[![vskill CERTIFIED](https://verified-skill.com/api/v1/skills/microsoft/microsoft-ui-xaml/test-suite-setup/badge)](https://verified-skill.com/skills/microsoft/microsoft-ui-xaml/test-suite-setup)

Something wrong with this skill or its page? Tell us.