writing-mstest-tests

Installation
SKILL.md

Writing MSTest Tests

Help users write effective, modern unit tests with MSTest 3.x/4.x using current APIs and best practices.

When to Use

  • User wants to write new MSTest unit tests
  • User wants to improve or modernize existing MSTest tests by implementing concrete fixes
  • User asks about MSTest assertion APIs, data-driven patterns, or test lifecycle
  • User needs help fixing a specific MSTest test bug or failing assertion
  • User asks to fix swapped Assert.AreEqual argument order (expected first, actual second)
  • User asks to convert DynamicData from IEnumerable<object[]> to ValueTuple-based data

When Not to Use

  • User needs a test quality audit, anti-pattern detection, or flaky-test investigation (use test-anti-patterns)
  • User needs to run or execute tests (use the run-tests skill)
  • User needs to upgrade from MSTest v1/v2 to v3 (use migrate-mstest-v1v2-to-v3)
  • User needs to upgrade from MSTest v3 to v4 (use migrate-mstest-v3-to-v4)
Related skills

More from dotnet/skills

Installs
242
Repository
dotnet/skills
GitHub Stars
1.7K
First Seen
Mar 17, 2026