TestFx 测试值证据应用
testfx-test-value-evidence
结合 TestFx 工具链、断言、并行安全、打包消费者(packed-consumer)和评审约定,应用项目内置的 test-value-evidence 技能。在实现或评审会改变行为的 TestFx PR 或提交时使用,包括仅修改源代码的变更。
- License 许可
- MIT
- 所属仓库
- microsoft/testfx
- 最近更新
- 2026-11-14
- Stars
- ★ 1.1k
- Forks
- 315
01 前言 Front Matter
- name
- testfx-test-value-evidence
- description
- Apply the vendored test-value-evidence skill with TestFx toolchain, assertion, parallel-safety, packed-consumer, and review conventions. Use when implementing or reviewing behavior-changing TestFx PRs or commits, including source-only changes.
03 SKILL.md 正文
TestFx test-value evidence
Read and apply the canonical test-value-evidence skill first, then these repository-specific requirements. Keep the canonical vendored file unmodified; its source revision and blob are recorded in eng/vendored-files.json.
- Read repository instructions. Use the
repository-pinned toolchain through
build.cmdorbuild.sh, capture binary logs for MSBuild commands, and use the owning project's assertion conventions andBannedSymbols.txt. MSTest framework tests useTestContainer; MTP and analyzer tests use MSTest; adapter tests use their established assertion APIs. - Apply parallel-safety preflight before test/lifecycle changes and against the final diff. Counterfactual experiments must use isolated outputs and preserve the actual test scheduling.
- For acceptance, package, launcher, protocol, or cross-component changes, apply acceptance validation. Repack each product variant before testing, prove the effective package/cache and loaded binary paths, and retain real shipping-layout evidence. Assert/API overload changes also need the repository's packed source-compatibility coverage.
- Reuse the installed test-gap-analysis for bounded static reasoning and the existing mutation workflow for available executed Stryker evidence. Do not upgrade unrelated curated plugins to run this skill.
- Keep publication under the code-review gate.
The automatic and
/review-testsreviewers are read-only: report static predictions or unavailable proof unless exact matching execution records can be inspected. Do not execute PR code or infer red-green proof from green CI. Put material evidence gaps in the summary, not automatic inline findings.
The existing review workflow reports the canonical evidence table for each eligible PR head, including unchanged tests protecting source-only changes. Individual commit validation is separate; neither the skill nor its vendored presence enforces a Git hook or proves live workflow publication.
04 同仓库更多 Skills
dotnet-breaking-changes
Use before changing .NET/C# code whose callers you do not control: a NuGet library, or a repo with PublicAPI.Shipped/Unshipped.txt, ApiCompat, multiple TargetFrameworks, InternalsVisibleTo, or generated (.g.cs) partials. Green builds miss silent breaks from optional parameters, parameter names, sealing, const values, nullability, and #if. USE FOR: "without breaking existing callers"; adding a public method, overload, optional parameter, or interface member to a shipped library; renaming a public method or an internal helper a friend assembly uses; consolidating duplicated logic; changing a signature, nullability, default, or attribute; adding a target framework; RS0016/RS0017 or ApiCompat errors; "is this PR breaking?". For a rename, extract, or merge, also invoke csharp-refactoring. DO NOT USE FOR: an executable whose callers all live in one project; renaming a local variable or private member, even in a shipped library; formatting; framework/SDK/NuGet upgrades (use dotnet-upgrade).
TestFx 并行安全预检
testfx-parallel-safety-preflight
在实现或重构 TestFx 测试、生命周期代码、辅助函数、共享状态声明,或这些测试所覆盖的生产代码路径之前,检查并发性与隔离性。在缩小 DoNotParallelize 或 ResourceLock 的使用范围、更改并行化设置或引入异步工作线程之前使用;并针对最终 diff 重复检查。
TestFx 本地化校验
testfx-localization-validation
验证生成的 TestFx 本地化目录、资源 ID、占位符和锁定标记。适用于 RESX/XLF 变更、OneLoc PR、本地化构建失败、重复的目标文本或翻译单元,以及孤立的翻译条目。
TestFx 验收验证
testfx-acceptance-validation
使用打包后的消费者、包与缓存来源、精确的退出码和产物,以及选中测试与实际执行测试的证据,验证 TestFx 的交付路径及有效的 CI 执行。适用于验收回归、包/MSBuild/启动器/协议变更,或仅有跳过测试的 CI 结果;不适用于无关的纯单元测试或文档变更。
会话交付规范管控
session-delivery-hygiene
把控本地会话范围、持久化交付、实时 PR 状态、集成来源以及责任范围内的清理工作。在实施指导变更、修改或推送 PR、诊断包与产物不匹配,或交接实现工作之前使用。
发布后收尾活动
post-release-activities
发布完成后需要执行的一系列系统化活动。