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 asks to replace Assert.IsTrue with more specific assertions (collections, nulls, types, comparisons)
  • User asks to replace hard casts with type-checking assertions in tests
  • 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
  • User asks to fix or understand an MSTest analyzer diagnostic (an MSTESTxxxx warning/error)

When Not to Use

Installs
453
Repository
dotnet/skills
GitHub Stars
3.5K
First Seen
Mar 17, 2026
writing-mstest-tests — dotnet/skills