PowerToys UI 测试 CI 流水线
ui-tests-pipeline-ci
面向微软正式员工(FTE)的 PowerToys UI 测试实现收尾工作流:在本地虚拟机(VM)测试套件成功运行后自动继续,提交并推送限定范围的变更,将构建加入 CI 队列,同步等待,并通过 Azure CLI 和 Azure DevOps REST API 完成稳定化。对于创建、迁移或稳定化任务,除非用户限定了范围,否则无需单独请求推送/运行 CI。也适用于明确的 UITests CI、环境准备预检、401/403 诊断、构建复用、录屏/产物(artifacts)以及三次运行限制。关键词:FTE、az、Azure CLI、Azure DevOps、pipeline、UI Test Automation、UITests CI、commit、push、local-to-CI handoff、buildNow、specificBuildId、uiTestModules、CI flake。
- License 许可
- MIT
- 最近更新
- 2026-11-15
- Stars
- ★ 14w
- Forks
- 8.7k
01 前言 Front Matter
- name
- ui-tests-pipeline-ci
- license
- MIT
- description
- Microsoft FTE-only completion workflow for PowerToys UI-test implementation: automatically continue after successful local VM suites, commit and push scoped changes, queue CI, wait synchronously, and stabilize through Azure CLI and Azure DevOps REST APIs. No separate push/run-CI request is needed for create, migrate, or stabilize tasks unless the user limited scope. Also use for explicit UITests CI, setup preflight, 401/403 diagnosis, build reuse, recordings/artifacts, and the three-run limit. Keywords: FTE, az, Azure CLI, Azure DevOps, pipeline, UI Test Automation, UITests CI, commit, push, local-to-CI handoff, buildNow, specificBuildId, uiTestModules, CI flake.
02 资源文件 6
- 参考文档references/agentic-loop.md21.7 KB
- 参考文档references/setup-preflight.md3.9 KB
- 脚本scripts/AzureDevOps.ps17.0 KB
- 脚本scripts/Test-AzureDevOpsSetup.ps116.0 KB
- 脚本scripts/Wait-AzureDevOpsBuild.ps17.8 KB
- 脚本tests/Wait-AzureDevOpsBuild.Tests.ps13.8 KB
03 SKILL.md 正文
PowerToys UI Tests Pipeline CI
Queue and stabilize the internal UI Test Automation Azure DevOps pipeline only after the target
UITest suite is proven locally. Use the existing Azure CLI sign-in plus Azure DevOps REST APIs for
discovery, preview, queueing, status, timelines, logs, tests, artifacts, and result attachments.
[!IMPORTANT] Microsoft FTE only. This workflow requires authorized access to the
microsoftAzure DevOps organization and theDartproject. External contributors stop after local validation and report CI as unavailable. Never store credentials, PATs, tokens, or internal artifact contents in the repository.
When to use
Invoke this skill automatically when an authorized Microsoft FTE's create, migrate, or stabilize UI tests task passes its full local VM matrix. That task includes scoped commit/push and CI validation; do not wait for an additional "run CI" request.
Also use it when an authorized Microsoft FTE asks to:
- Queue PowerToys UITests in the internal
UI Test Automationpipeline. - Validate Azure CLI and Azure DevOps readiness before queueing or after a
401/403response. - Monitor a UITests pipeline run or summarize its stages, tests, and artifacts.
- Iterate on a failure that passed the complete local VM matrix.
- Reuse a prior successful product build while rebuilding only one or more UITest projects.
- Find and share failed-test screenshots, logs, or recording links.
Do not use this skill for local execution. Complete ui-tests-local-vm first. Use ui-tests-migration for test implementation and stabilization.
Automatic handoff and scope
The three skills form one delivery workflow, not three independently complete tasks. Local success means ready for publication and CI, not done. Follow references/agentic-loop.md to review the diff, commit only task-owned files, push a feature branch without force, and record the exact remote SHA before queueing. Never include unrelated work or secrets.
Honor explicit local-only/no-push/no-CI instructions. A status question, read-only investigation, VM setup, or local execution of an existing suite does not authorize publishing changes. External contributors or failed access/push preflights stop at the exact blocker; do not bypass sign-in, permissions, protected branches, or local gates. For an end-to-end task, keep CI pending until verified terminal success or a documented blocker/three-run escalation.
Non-negotiable gates
- Setup preflight first. Before the first Azure operation in a session, run
Test-AzureDevOpsSetup.ps1 and require
Ready=truewith every required checkPASS. It performs reads and a non-mutating pipeline preview only. Re-run it after account changes or any401/403response. - Local first. Do not queue CI until all required local runs are green, including full suites on
the default and
Constrainedprofiles for Windows 10 and Windows 11, plus the applicable architecture builds/guests required byui-tests-local-vm. - Pushed revision. Queue only a pushed branch. Record its exact commit and verify the queued
run's
sourceVersionmatches it. Creating and pushing that scoped commit is part of the implementation workflow, not an optional user follow-up. - One run per branch. Before queueing, discover active runs for
UI Test Automation. Wait for or cancel a relevant superseded run on the target branch; runs on other branches may continue in parallel. Never cancel another branch's unrelated run. - Always scope modules.
uiTestModulesmust be non-empty and contain the exact current UITest project stem, for example[FancyZonesEditor.UITests.Next]. - Three-run ceiling. A CI stabilization sequence may queue at most three runs total. Keep an attempt ledger. If run 3 is not green, stop and ask the user for assistance. Also stop when three consecutive runs show no stabilization progress.
- Evidence before edits. Read the failed result, logs, screenshot, and recording before forming a fix hypothesis. Preserve assertions and classify infrastructure failures separately.
- Tracked runs remain unfinished work. After queueing, persist the build ID, branch, source SHA,
attempt number, and parameters in session/task state. Do not mark the task complete or claim a
terminal result while that build is nonterminal. Immediately run
Wait-AzureDevOpsBuild.ps1 synchronously in the foreground,
bound to the exact build ID, branch, and source SHA. Keep the same agent turn alive until the
waiter returns, then verify the terminal result and continue stabilization without user input.
Do not end the turn or call
task_completewhile the waiter runs.
Internal constants
| Setting | Value |
|---|---|
| Azure DevOps organization | microsoft |
| Project | Dart |
| Pipeline name | UI Test Automation |
| Current known definition ID | 161438 (discover by name each session; do not blindly hardcode) |
| Azure DevOps token resource | 499b84ac-1321-427f-aa17-267ca6975798 |
| Required setup check | scripts/Test-AzureDevOpsSetup.ps1 |
| Required completion waiter | scripts/Wait-AzureDevOpsBuild.ps1 |
| Platforms | arm64, x64 |
| Default booleans | enableMsBuildCaching=false, useVSPreview=false, useLatestWebView2=false |
Required workflow
Read and execute references/agentic-loop.md from top to bottom. It contains:
- The required prompt-free setup preflight and bundled REST helper.
- Local-signoff and active-run preflight.
buildNowversusspecificBuildIddecision rules.- Exact queue parameters and branch targeting.
- Monitoring, failure evidence, direct Azure Test attachment downloads, and recording links.
- Agent-owned foreground completion waiting and truthful client capability limits.
- The three-run stabilization ledger and stop conditions.
Completion standard
A task is complete only when one of these is true:
- The run is terminal
Succeeded, all selected tests executed, and there are no failed, aborted, timed-out, error, or not-executed results. - For a monitor-only request, the run is terminal but failed, and the report includes the controlling failure, relevant logs, and available recording/artifact links.
- For a stabilization request, a terminal failed run is intermediate work. Continue the agentic loop until a later attempt succeeds, a genuine blocker prevents the next verified attempt, or the three-run/no-progress ceiling is reached.
- The three-run ceiling or no-progress rule was reached, and the agent stopped and asked the user for assistance with the full attempt ledger and evidence links.
04 同仓库更多 Skills
Windows 桌面 API 检索
winmd-api-search
查找并探索 Windows 桌面 API。当构建需要平台能力的功能时使用——相机、文件访问、通知、UI 控件、AI/ML、传感器、网络等。为任务找到合适的 API,并检索完整的类型详情(方法、属性、事件、枚举值)。
PowerToys UI 测试迁移与稳定化
ui-tests-migration
使用 Microsoft.PowerToys.UITest.Next 和 winappcli 创建、迁移并稳定 PowerToys UI 测试,直至本地虚拟机(VM)测试通过、提交/推送(commit/push)并完成 CI 验证。适用于移植、新建 UITest 项目、CI 中不稳定的(flaky)测试、持久化的 Hyper-V 验证、Settings IPC 身份验证/测试签名、Explorer/Shell 选择、预览处理程序、缩略图提供程序、热键激活、有状态进程生命周期、组合的 WinUI/WebView 视觉基线,或前台失败等问题。涵盖 API、脚手架搭建、测试设计、诊断,以及必须移交给 ui-tests-pipeline-ci 的交接流程。关键词:UI test、UITests、UITestAutomation.Next、winappcli、WinAppDriver、Selenium、Settings IPC、not-microsoft-signed、Authenticode、local VM、Hyper-V、checkpoint、migrate、flaky、CI stability、Explorer、Shell extension、WebView2。
PowerToys发布说明生成
release-note-generation
一个工具包,用于从 GitHub 里程碑(milestones)、提交范围(commit ranges)或 Azure DevOps 发布候选构建生成 PowerToys 稳定版或预览版的发布说明。可准备带有三段式 GitHub 标签的预览版草稿,同时保留四段式的构建版本和资源版本。当被要求创建发布说明、总结里程碑 PR、生成变更日志、准备预览版草稿、计算 main 与 stable 分支之间的 PR 差异、更新发布文档、管理 PR 里程碑,或准备和验证发布资源时使用。
PowerToys 端到端验证
powertoys-verification
使用 winapp CLI 端到端验证 PowerToys 行为,覆盖两个场景:(A) 将模块的发布清单与已安装构建进行核对;(B) PR 验证——根据每个 PR 的描述+diff 推导其清单,然后针对已安装构建(已合并/已发布的 PR,或整个发布/hotfix 集)执行验证;若该 PR 尚未进入构建(未合并或尚未发布),则通过构建+sideload 模块来执行。通过 UIA invoke/Named Events/settings.json 编辑/剪贴板/GPO/SendInput 驱动每一项,并针对每一项输出结构化的 PASS/FAIL/BLOCKED 结论及证据(其中 FAIL 会区分产品缺陷与过时/模糊的清单项)。当被要求验证模块清单、验证 PR、签署发布/hotfix 的 PR,或对已安装/sideload 的 PowerToys 构建进行 QA 时使用。它结合了通用 winapp UI 机制(references/winapp-ui-testing.md)与 PowerToys 专属方法、各场景的 playbook(references/scenarios/),以及随本技能附带的 .ps1 辅助文件。
命令面板扩展发布
publish-extension
将你的命令面板(Command Palette)扩展发布到 Microsoft Store 或 WinGet。当用户要求发布、分发、发行、部署到商店、创建 MSIX 包、提交到 WinGet、配置发布用 CI/CD,或使用 GitHub Actions 自动化构建时使用。
命令面板兜底搜索命令
add-fallback-commands
为你的 Command Palette 扩展添加兜底命令,以实现通用(catch-all)搜索行为。当被要求添加搜索功能、查询匹配、直接输入处理、计算器式求值、URL 打开、命令执行,或在其他扩展都不匹配时显示结果时使用。20 个内置扩展中有 14 个使用了该功能。