Agent skill · dotnet

migrate-nunit-to-mstest

Convert .NET tests from NUnit 3/4 to MSTest v4 while preserving VSTest or MTP. Use for replacing NUnit/NUnit3TestAdapter packages, Test/TestCase/ TestCaseSource/Values attributes, constraint assertions, SetUp/TearDown, OneTimeSetUp, SetUpFixture, FixtureLifeCycle, TestContext, categories, retries, timeouts, and NUnit parallelization. Also use when a "convert NUnit to MSTest" request may already be migrated: inspect and report the no-op. Do not use for NUnit version upgrades, xUnit/TUnit conversion, MSTest upgrades, or runner-only VSTest-to-MTP migration.

What it needs

About 8k tokens when loaded.

What this skill does

NUnit -> MSTest Migration Convert NUnit 3 or 4 tests to MSTest v4 without changing the target framework or test platform. A successful migration builds, discovers the same test cases, and preserves pass/fail, lifecycle, data, filtering, and concurrency semantics. Scope Use this skill only when the project contains NUnit packages or source and the user wants MSTest. If the project already uses MSTest and contains no NUnit tests, report that no framework migration is needed and make no changes. Do not combine this framework conversion with a target-framework upgrade or VSTest/MTP migration. Complete and verify one migration before starting another. Workspace Contract Search the current working directory for projects and source; never look for user files under this skill's directory. Classify the deliverable: "convert this project" means edit, build, and test; "give me a plan" means answer without editing. Preserve the user's requested project scope. Shared props may be changed only when they own NUnit package or runner configuration for that scope. The final response must state the source NUnit version, preserved runner, changed files, high-risk semantic mappings, and actual test counts. Response Mode Full migration request: inspect, edit, build, and run tests. Do not stop after a plan. Focused compile error or API question: apply only the relevant mapping. Unsupported target framework: stop before changing packages. MSTest v4 requires .NET 8+ or .NET Framework 4.6.2+ for test applications; offer a separately approved TFM upgrade or MSTest v3. Decisions That Change the Result Detected state Required action --- --- No NUnit package, namespace, attribute, or constraint remains Stop, make no changes, and run the existing test command once to prove the already-MSTest project is healthy. Source uses VSTest Preserve VSTest. Retain and update an explicit Microsoft.NET.Test.Sdk pin when the repository owns one; do not introduce MTP properties. …

How to use it

Reference it in AdaL, Claude Code, Cursor or any coding agent — nothing to install:

@skills dotnet/migrate-nunit-to-mstest

View the source on GitHub

Browse the @skills marketplace