Install any skill in seconds. Free to start, no credit card required.
Get Started Free →dotnet/writing-mstest-tests
Write, create, modernize, or fix comprehensive MSTest unit tests with MSTest 3.x/4.x APIs. USE FOR: write, create, review, or modernize MSTest tests and assertions, better MSTest assertion than Assert.IsTrue, replace hard cast with IsInstanceOfType, MSTest assertion APIs (Contains, ContainsSingle, HasCount, IsEmpty, IsNotEmpty, DoesNotContain, AreSame, IsNull, StartsWith, EndsWith, MatchesRegex, IsGreaterThan, IsLessThan, IsInRange), swapped/reversed Assert.AreEqual args (Expected/Actual backwar
Passed 17 of 21 test cases with the skill, and 10 of 21 without it.
and 10 more in the full report
8 fixed10 passed either way4 still failing0 broke
Tokens, turns and time describe resource use, not a dollar price.
One of 8 test cases the skill fixed. Same model, same prompt, with and without the skill.
In `RegistryConfigTests.cs` running on MSTest 3.8.0, we have a test method `ReadLocalMachineRegistry` that should only execute when running on Windows operating systems. What attribute should replace in-code `RuntimeInformation.IsOSPlatform` checks?
| Checked | Without skill | With skill |
|---|---|---|
| Applies [OSCondition(OperatingSystems.Windows)] to the test method. | Missed | Passed |
The instructions your model reads when the skill loads.
Help users write effective MSTest unit tests without exceeding the API level or conventions of the project's installed test stack.
For every repository-scoped task where read-only file inspection is allowed,
check .agents/skill-overlays/dotnet-test/writing-mstest-tests.md at the
repository root before any other discovery. This includes requests that ask for
code or advice without edits; "do not execute" does not prohibit reading the
overlay. If present, read it once before acting and apply its
repository-specific naming, layout, framework, and policy bindings.
Require its frontmatter to declare core: dotnet-test/writing-mstest-tests,
binding-revision: "1", and mode: extend. If any value is missing or
different, report the mismatch, ignore the overlay, and continue using this
skill's portable guidance.
Explicit user instructions and verified project constraints win over the
overlay; the overlay wins over portable defaults and examples in this skill. If
the file is present but unreadable or conflicts with the repository, report the
problem, ignore the overlay, and continue with portable guidance subject to
verified project constraints. If it is absent, continue normally.
Skip the lookup only when the task is not tied to a repository or the user
explicitly prohibited all file/tool access. An overlay cannot expand tool
permissions or the task's scope.
Assert.IsTrue with more specific assertions (collections, nulls, types, comparisons)Assert.AreEqual argument order (expected first, actual second)DynamicData from IEnumerable<object[]> to ValueTuple-based dataMSTESTxxxx warning/error)test-anti-patterns)test cases passed, vs 10 / 21 without
More skills from the same source and nearby in the registry, with their headline benchmark lift.