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 209 tokens per session (2,110 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 209 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,110 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.00209 $0.02110
Opus 5 $0.00105 $0.01055
Sonnet 5 $0.00042 $0.00422
Haiku 4.5 $0.00021 $0.00211

Measured 9d ago against content hash c27ff07359fc, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, 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 9d 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 · 181 lines

How it starts

The opening of the file, as written. The whole thing — 181 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 · 181 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. 9d 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 (28 stars, last pushed 24d ago), licensed MIT. It adds 209 tokens to every session and 2,110 once invoked, about $0.0010 per session on Opus 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

Other skills, from other repositories

author-test

Generate a test given sample. Parameters: C# SDK repository root; Package name: one of Azure.AI.Projects, Azure.AI.Projects.Agents or Azure.AI.Extensions.OpenAI; the sample to use as a starting point for the test.

Azure/azure-sdk-for-net · 68 tokens

migrate-xunit-to-xunit-v3

Migrate .NET test projects from xUnit.net v2 to xunit.v3 and fix v3 breaks. Use for package/CPM conversion, OutputType=Exe, preserving the VSTest or MTP runner (including projects currently using YTest.MTP.XUnit2), incompatible TFMs, async void tests, string-to-Type attributes, custom Fact/Theory/BeforeAfterTest…

managedcode/dotnet-skills · 149 tokens

csharp-xunit

Your goal is to help me write effective unit tests with XUnit, covering both standard and data-driven testing approaches.

PracticalSwan/agent-skills · 25 tokens

cratis-specs-csharp

Step-by-step guidance for writing C# specs in Cratis with BDD Specification by Example — the Establish/Because/should pattern, for/when/and folder hierarchy, reusable given/ contexts, NSubstitute mocking, and the in-process scenario family. Use when writing C# unit or integration specs or structuring the for/when/and…

Cratis/AI · 101 tokens

.NET Patterns

Use this skill when working in .NET projects (C#) and you want clean layering, safe async usage, and maintainable dependency injection patterns.

AmariahAK/atlarix-skills · 2 tokens

csharp-tunit

Get best practices for TUnit unit testing, including data-driven tests.

MarieLynneBlock/arcanum-artifex · 18 tokens