dotnet-testing-advanced-xunit-upgrade-guide

dotnet-testing-advanced-xunit-upgrade-guide is a skill for Claude Code, Codex from kevintsengtw/dotnet-testing-agent-skills. It costs 165 tokens per session (2,321 once invoked), scanned A, original, MIT.

A migration guide for updating .NET projects from xUnit 2.9 to xUnit 3, where xUnit is a framework for running automated tests. It covers renamed packages, required runtimes, breaking changes, upgrade steps, new features, and test-container integration.

In plain words
What is it for?
Use it when upgrading an xUnit-based .NET test project, fixing incompatibilities, moving to the newer test runner, or adopting xUnit 3 features.
Why use it?
It explains changes that can break builds or tests during an xUnit upgrade. The guide helps identify required code, project-file, and test-runner updates.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it when upgrading an xUnit-based .NET test project, fixing incompatibilities, moving to the newer test runner, or adopting xUnit 3 features.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/kevintsengtw/dotnet-testing-agent-skills/dotnet-testing-advanced-xunit-upgrade-guide
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add kevintsengtw/dotnet-testing-agent-skills --skill dotnet-testing-advanced-xunit-upgrade-guide
Clone the repo
git clone --depth 1 https://github.com/kevintsengtw/dotnet-testing-agent-skills

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for dotnet-testing-advanced-xunit-upgrade-guide

README.md
[![agentmods](https://agentmods.dev/badge/skills/kevintsengtw/dotnet-testing-agent-skills/dotnet-testing-advanced-xunit-upgrade-guide/github.svg)](https://agentmods.dev/skills/kevintsengtw/dotnet-testing-agent-skills/dotnet-testing-advanced-xunit-upgrade-guide)
Your own site
<a href="https://agentmods.dev/skills/kevintsengtw/dotnet-testing-agent-skills/dotnet-testing-advanced-xunit-upgrade-guide"><img src="https://agentmods.dev/badge/skills/kevintsengtw/dotnet-testing-agent-skills/dotnet-testing-advanced-xunit-upgrade-guide/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for dotnet-testing-advanced-xunit-upgrade-guide

Your own site · 80×15
<a href="https://agentmods.dev/skills/kevintsengtw/dotnet-testing-agent-skills/dotnet-testing-advanced-xunit-upgrade-guide"><img src="https://agentmods.dev/badge/skills/kevintsengtw/dotnet-testing-agent-skills/dotnet-testing-advanced-xunit-upgrade-guide.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 165 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,321 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00165 $0.02321
Opus 5.5 $0.00066 $0.00928
Sonnet 5.5 $0.00033 $0.00464
Haiku 4.5 $0.00016 $0.00232

Measured 2mo ago against content hash 2c9d46226224, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

dotnet-testing-advanced-xunit-upgrade-guide scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2mo ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/dotnet-testing-advanced-xunit-upgrade-guide/SKILL.md · 188 lines

How it starts

The opening of the file, as written. The whole thing — 188 lines — stays where its author put it; the contents beside it link to each section on GitHub.

xUnit 升級指南:從 2.9.x 到 3.x

核心概念

套件命名變革

xUnit v3 採用全新的套件命名策略:

v1~v2 套件名稱 v3 套件名稱 說明
xunit xunit.v3 主要測試框架
xunit.assert xunit.v3.assert 斷言函式庫
xunit.core xunit.v3.core 核心元件
xunit.abstractions (移除) 不再需要
xunit.runner.visualstudio xunit.runner.visualstudio (3.x.y) 測試執行器

重要:使用 xunit.v3 套件名稱,不是 xunit。

最低運行時需求

  • .NET Framework 4.7.2+ 或 .NET 8.0+ (推薦)
  • 不支援:.NET Core 3.1、.NET 5/6/7

破壞性變更

涵蓋 OutputType 改為 Exe、async void 不再支援、IAsyncLifetime 繼承 IAsyncDisposable、SkippableFact 移除、僅支援 SDK-style 專案、自訂 DataAttribute 簽名變更等六項破壞性變更,每項皆附修正前後的程式碼對照。

完整破壞性變更清單與程式碼範例請參考 references/breaking-changes.md


升級步驟

五步驟 SOP:建立升級分支 → 更新專案檔案(套件、OutputType)→ 修正 async void → 更新 using → 編譯與測試。另含 .NET 10 SDK MTP 模式遷移指南(global.json 設定、CLI 用法變更、VSTest 遷移步驟)。

完整升級步驟與 .NET 10 MTP 模式指南請參考 references/upgrade-steps.md


xUnit 3.x 新功能

涵蓋 Assert.Skip / SkipUnless / SkipWhen 動態跳過、Explicit Tests、[Test] 屬性、MatrixTheoryData 矩陣測試、Assembly Fixtures、Test Pipeline Startup、多格式測試報告等新功能,每項皆附完整程式碼範例。

完整新功能範例請參考 references/new-features.md

Testcontainers.XunitV3 整合套件

Testcontainers 官方推出 Testcontainers.XunitV3(4.9.0),專為 xUnit v3 設計的整合套件,自動管理容器的建立與銷毀,取代手動實作 IAsyncLifetime 的方式。

<PackageReference Include="Testcontainers.XunitV3" Version="4.9.0" />

若專案同時使用 Testcontainers 與 xUnit v3,建議採用此套件簡化容器生命週期管理。


xunit.runner.json 設定

{
  "$schema": "https://xunit.net/schema/v3/xunit.runner.schema.json",
  "parallelAlgorithm": "conservative",
  "maxParallelThreads": 4,
  "diagnosticMessages": true,
  "internalDiagnosticMessages": false,
  "methodDisplay": "classAndMethod",
  "preEnumerateTheories": true,
  "stopOnFail": false
}

Read the full file on GitHub · 188 lines

Files

What ships with it

8 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2mo ago Changed · +7 lines · -44 tokens per session 2c9d46226224
  2. 3mo ago First seen · 181 lines · 209 tokens per session scan A c27ff07359fc

Subscribe to this mod's changes

dotnet-testing-advanced-xunit-upgrade-guide is a skill published in the GitHub repository kevintsengtw/dotnet-testing-agent-skills (30 stars, last pushed 1mo ago), licensed MIT. It adds 165 tokens to every session and 2,321 once invoked, about $0.0007 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

dotnet-testing-advanced-xunit-upgrade-guide compared with skills from other repositories

dotnet-testing-advanced-xunit-upgrade-guide next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
dotnet-testing-advanced-xunit-upgrade-guidekevintsengtw/dotnet-testing-agent-skillsSkill301mo agoMITA165Claude Code, Codex
author-testAzure/azure-sdk-for-netSkill6.1ktodayMITA68Claude Code, Codex
migrate-xunit-to-xunit-v3managedcode/dotnet-skillsSkill52716d agoMITA149Claude Code, Codex
clean-architecture-dotnetSebastienDegodez/copilot-instructionsSkill19924d agoApache-2.0A50Claude Code, Codex
creating-dotnet-mcp-serversSebastienDegodez/copilot-instructionsSkill19924d agoApache-2.0A43Claude Code, Codex
csharp-xunitPracticalSwan/agent-skillsSkill2515d agoMITA25Codex
cratis-specifications-isolate-behaviorCratis/AISkill4todayMITA46Claude Code, Codex