ScottPlot Test Runner
ScottPlot/ScottPlot
Run or add ScottPlot 5 tests. Use for unit-test and cookbook-test work; unless explicitly asked otherwise, restrict manual test execution to the Unit Tests…
ALWAYS USE when asked to fix, rewrite, update, improve, modernize, show corrected code for, or explain existing MSTest tests or MSTest-specific configuration.
$ npx skills add dotnet/skills --skill writing-mstest-tests -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install dotnet/skills writing-mstest-tests --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/dotnet/skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/plugins/dotnet-test/skills/writing-mstest-tests .claude/skills/writing-mstest-tests && rm -rf skills-srcUse ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.
Claude Code skills documentation · loads skills from .claude/skills/
Install the "writing-mstest-tests" agent skill from https://github.com/dotnet/skills/tree/main/plugins/dotnet-test/skills/writing-mstest-tests into .claude/skills/writing-mstest-tests/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "writing-mstest-tests", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/dotnet/skills/tree/main/plugins/dotnet-test/skills/writing-mstest-testsType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add dotnet/skills --skill writing-mstest-tests -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install dotnet/skills writing-mstest-tests --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/dotnet/skills.git skills-src && mkdir -p .agents/skills && cp -r skills-src/plugins/dotnet-test/skills/writing-mstest-tests .agents/skills/writing-mstest-tests && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "writing-mstest-tests" agent skill from https://github.com/dotnet/skills/tree/main/plugins/dotnet-test/skills/writing-mstest-tests into .agents/skills/writing-mstest-tests/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "writing-mstest-tests", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add dotnet/skills --skill writing-mstest-tests -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install dotnet/skills writing-mstest-tests --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/dotnet/skills.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/plugins/dotnet-test/skills/writing-mstest-tests .cursor/skills/writing-mstest-tests && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "writing-mstest-tests" agent skill from https://github.com/dotnet/skills/tree/main/plugins/dotnet-test/skills/writing-mstest-tests into .cursor/skills/writing-mstest-tests/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "writing-mstest-tests", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/dotnet/skills.git --path plugins/dotnet-test/skills/writing-mstest-tests--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add dotnet/skills --skill writing-mstest-tests -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install dotnet/skills writing-mstest-tests --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/dotnet/skills.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/plugins/dotnet-test/skills/writing-mstest-tests .gemini/skills/writing-mstest-tests && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "writing-mstest-tests" agent skill from https://github.com/dotnet/skills/tree/main/plugins/dotnet-test/skills/writing-mstest-tests into .gemini/skills/writing-mstest-tests/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "writing-mstest-tests", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install dotnet/skills writing-mstest-testsInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add dotnet/skills --skill writing-mstest-tests -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/dotnet/skills.git skills-src && mkdir -p .github/skills && cp -r skills-src/plugins/dotnet-test/skills/writing-mstest-tests .github/skills/writing-mstest-tests && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "writing-mstest-tests" agent skill from https://github.com/dotnet/skills/tree/main/plugins/dotnet-test/skills/writing-mstest-tests into .github/skills/writing-mstest-tests/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "writing-mstest-tests", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add dotnet/skills --skill writing-mstest-tests -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install dotnet/skills writing-mstest-tests --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/dotnet/skills.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/plugins/dotnet-test/skills/writing-mstest-tests .opencode/skills/writing-mstest-tests && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "writing-mstest-tests" agent skill from https://github.com/dotnet/skills/tree/main/plugins/dotnet-test/skills/writing-mstest-tests into .opencode/skills/writing-mstest-tests/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "writing-mstest-tests", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
writing-mstest-testsALWAYS USE when asked to fix, rewrite, update, improve, modernize, show corrected code for, or explain existing MSTest tests or MSTest-specific configuration.
Writing Mstest Tests is an agent skill from dotnet/skills, published by the product's own GitHub organization. ALWAYS USE when asked to fix, rewrite, update, improve, modernize, show corrected code for, or explain existing MSTest tests or MSTest-specific configuration. Use for "review" when corrected code or edits are wanted, even for one pasted assertion or passing tests with bad failure output. Covers expected/actual labels; generic Boolean, collection, string, numeric, null, identity, exception, hard-cast, and object[] checks; TestContext/lifecycle; timeout/cancellation; OS/CI conditions, retry, cleanup…
Its SKILL.md is about 5k tokens, which your agent loads only when the skill is triggered. The skill folder holds 2 other files, including reference files (for example `references/advanced-mstest-patterns.md`).
It sits in Testing & QA, covering Test generation. It works with .NET. The repository describes itself as: Repository for skills to assist AI coding agents with .NET and C. The licence is MIT.
9 steps, taken from the step headings in SKILL.md.
Read from SKILL.md and the folder at commit 3d38ac3. It shows what the files ask for, not the result of running them.
Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.
From allowed-tools in the SKILL.md frontmatter.
Shell commands in SKILL.md call:
dotnetFrom the folder's file list and the shell code blocks in SKILL.md.
No URLs in SKILL.md.
From URLs in SKILL.md, links to its own repository left out.
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Writing Mstest Tests loads about 5k tokens when it runs, and up to ~6.1k if it reads all its reference files. Until then it costs about 205 tokens; SKILL.md has 1,757 words of instructions outside code blocks.
Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.
The automated check found no risky patterns in SKILL.md.
Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.
The full file from dotnet/skills at commit 3d38ac3, republished under its MIT licence (© dotnet). 1,757 words, ~4,995 tokens.
.claude/skills/writing-mstest-tests/SKILL.md (or your agent's skills folder). This skill also uses 1 other file; get the full folder from GitHub.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)run-tests skill)migrate-mstest-v1v2-to-v3)migrate-mstest-v3-to-v4)| Input | Required | Description |
|---|---|---|
| Code under test | No | The production code to be tested |
| Existing test code | No | Current tests to fix, update, or modernize |
| Test scenario description | No | What behavior the user wants to test |
code-testing; use this
skill only as supporting MSTest API/version guidance.Assert.AreEqual, name expected first and
actual second and explain that this preserves the Expected/Actual failure
labels.score > 0 -> Assert.IsGreaterThan(0, score),
score < 100 -> Assert.IsLessThan(100, score), and
score >= 60 && score <= 90 -> Assert.IsInRange(60, 90, score).
Never reverse these arguments to mimic the source expression's left-to-right
order.ThrowsExactly<T> (exact type) from Throws<T> (type or derived
type), and capture the returned exception when properties such as ParamName
are part of the behavior.Check the test project, packages.config, and assembly reference HintPath
values for the exact MSTest version and project system:
MSTest.Sdk: resolve its exact version from the project SDK
declaration or global.json msbuild-sdks; do not assume the latest APIsMSTest metapackage: resolve its exact package versionMSTest.TestFramework + MSTest.TestAdapter: check version for feature availabilityToolsVersion, Microsoft.CSharp.targets,
explicit <Compile Include>) and/or packages.config: preserve that project
system and add each new test file to <Compile Include>.Also inspect representative tests for custom base fixtures, helper libraries, mock syntax, naming, setup, and data builders. Existing conventions and installed versions win over the examples below. Do not upgrade MSTest, Moq, NBuilder, or the project format unless the user explicitly asks for a migration.
| API/pattern | Minimum version | Compatible fallback |
|---|---|---|
Assert.ThrowsExactly*, unified Assert.Contains / HasCount / IsEmpty / IsNotEmpty | 3.8 | Assert.ThrowsException*, CollectionAssert, StringAssert |
Assert.IsGreaterThan, IsLessThan, IsInRange, StartsWith, EndsWith, MatchesRegex | 3.10 | Assert.IsTrue with a clear message, or StringAssert |
Generic Assert.IsInstanceOfType<T>(value, out var typed) | 3.4-3.11 only | Non-generic assertion then post-assert cast on 3.0-3.3; v4 returns the typed value directly |
ValueTuple DynamicData | 3.7 | IEnumerable<object[]> |
Constructor injection of TestContext | 3.6 | Instance TestContext property |
[Retry], [OSCondition] | 3.8 | No built-in retry/OS condition; fix flakiness or retain the existing condition mechanism |
[CICondition] | 3.10 | Existing project-specific condition mechanism |
For example, MSTest 3.5.x must not receive Assert.ThrowsExactly,
Assert.Contains, ValueTuple DynamicData, or constructor-injected
TestContext.
Treat this as a hard gate: after determining the version, do not copy a later example from this skill unless its minimum version is satisfied.
Recommend MSTest.Sdk or the MSTest metapackage only for genuinely new projects:
<!-- Option 1: MSTest SDK (simplest, recommended for new projects) -->
<Project Sdk="MSTest.Sdk">
<PropertyGroup>
<TargetFramework>net9.0</TargetFramework>
</PropertyGroup>
</Project>When using MSTest.Sdk, put the version in global.json instead of the project file so all test projects get bumped together:
{
"msbuild-sdks": {
"MSTest.Sdk": "3.8.2"
}
}<!-- Option 2: MSTest metapackage -->
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net9.0</TargetFramework>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="MSTest" Version="3.8.2" />
</ItemGroup>
</Project>Apply these structural conventions only where they do not conflict with the suite's established base classes and lifecycle:
sealed for performance and design clarity[TestClass] on the class and [TestMethod] on test methodsMethodName_Scenario_ExpectedBehavior[ProjectName].Tests[TestClass]
public sealed class OrderServiceTests
{
[TestMethod]
public void CalculateTotal_WithDiscount_ReturnsReducedPrice()
{
// Arrange
var service = new OrderService();
var order = new Order { Price = 100m, DiscountPercent = 10 };
// Act
var total = service.CalculateTotal(order);
// Assert
Assert.AreEqual(90m, total);
}
}Pick the most specific assertion supported by the installed MSTest version.
More specific assertions produce better failure messages and make the test's
intent clear, but uncompilable "modern" assertions are worse than compatible
StringAssert, CollectionAssert, or Assert.IsTrue calls.
| What you are testing | Assertion |
|---|---|
| Two values are equal | Assert.AreEqual(expected, actual) |
| Same object instance (reference identity) | Assert.AreSame(expected, actual) |
| Value is null | Assert.IsNull(value) |
| Value is not null | Assert.IsNotNull(value) |
| Collection is empty | Assert.IsEmpty(collection) (3.8+) or CollectionAssert / count assertion |
| Collection is not empty | Assert.IsNotEmpty(collection) (3.8+) or count assertion |
| Collection has exactly N items | Assert.HasCount(N, collection) (3.8+) or Assert.AreEqual on count |
| Collection contains an item | Assert.Contains(item, collection) (3.8+) or CollectionAssert.Contains |
| Collection does not contain an item | Assert.DoesNotContain(item, collection) (3.8+) or CollectionAssert.DoesNotContain |
| Object is a specific type | Assert.IsInstanceOfType<T>(value) |
| Code throws an exception | Assert.ThrowsExactly<T> (3.8+) or Assert.ThrowsException<T> (earlier) |
On MSTest 3.8+, prefer Assert class methods over StringAssert or
CollectionAssert where both exist. Older versions should keep the compatible
specialized classes.
When several independent collection properties were requested, keep each
semantic check explicit even if another assertion happens to imply it. For
example, retain IsNotEmpty when the requested diagnostics distinguish
empty/non-empty, then use HasCount and ContainsSingle for their separate
cardinality guarantees.
Assert.AreEqual(expected, actual); // Value equality
Assert.AreSame(expected, actual); // Reference equality -- same object instance
Assert.IsNull(value);
Assert.IsNotNull(value);// MSTest 3.8+
var ex = Assert.ThrowsExactly<ArgumentNullException>(() => service.Process(null));
Assert.AreEqual("input", ex.ParamName);
// Async
var ex = await Assert.ThrowsExactlyAsync<InvalidOperationException>(
async () => await service.ProcessAsync(null));Assert.Throws<T> matches T or any derived typeAssert.ThrowsExactly<T> matches only the exact type TOn MSTest 3.7 and earlier, use the compatible API:
var ex = Assert.ThrowsException<ArgumentNullException>(
() => service.Process(null));// MSTest 3.8+
Assert.Contains(expectedItem, collection);
Assert.DoesNotContain(unexpectedItem, collection);
var single = Assert.ContainsSingle(collection); // Returns the single element
Assert.HasCount(3, collection);
Assert.IsEmpty(collection);
Assert.IsNotEmpty(collection);On earlier versions use CollectionAssert.Contains,
CollectionAssert.DoesNotContain, and Assert.AreEqual(expectedCount, collection.Count).
Replace generic Assert.IsTrue with specialized assertions -- they give better failure messages:
| Instead of | Use |
|---|---|
Assert.IsTrue(list.Count > 0) | Assert.IsNotEmpty(list) |
Assert.IsTrue(list.Count == 0) | Assert.IsEmpty(list) |
Assert.IsTrue(list.Count() == 3) | Assert.HasCount(3, list) |
Assert.IsTrue(x != null) | Assert.IsNotNull(x) |
Assert.IsTrue(x == null) | Assert.IsNull(x) |
Assert.AreEqual(a, b) for same instance | Assert.AreSame(a, b) -- reference identity |
Assert.IsTrue(!list.Contains(item)) | Assert.DoesNotContain(item, list) |
list.Single(predicate) + Assert.IsNotNull | Assert.ContainsSingle(list) |
Assert.IsTrue(list.Contains(item)) | Assert.Contains(item, list) |
// MSTest 3.10+
Assert.Contains("expected", actualString);
Assert.StartsWith("prefix", actualString);
Assert.EndsWith("suffix", actualString);
Assert.MatchesRegex(@"\d{3}-\d{4}", phoneNumber);On earlier versions use StringAssert.Contains, StringAssert.StartsWith,
StringAssert.EndsWith, and StringAssert.Matches.
MSTest 3.x is not one API level. Pick the form supported by the installed minor version:
// MSTest 3.0-3.3
Assert.IsInstanceOfType(result, typeof(MyHandler));
var typed = (MyHandler)result; // Safe because the assertion stops a mismatch.// MSTest 3.4-3.11 -- out parameter
Assert.IsInstanceOfType<MyHandler>(result, out var typed);
typed.Handle();// MSTest 4.x -- returns the proven value directly
var typed = Assert.IsInstanceOfType<MyHandler>(result);Assert.IsGreaterThan(lowerBound, actual);
Assert.IsLessThan(upperBound, actual);
Assert.IsInRange(low, high, actual);[TestMethod]
[DataRow(1, 2, 3)]
[DataRow(0, 0, 0, DisplayName = "Zeros")]
[DataRow(-1, 1, 0)]
public void Add_ReturnsExpectedSum(int a, int b, int expected)
{
Assert.AreEqual(expected, Calculator.Add(a, b));
}On MSTest 3.7+, prefer ValueTuple return types over
IEnumerable<object[]> for type safety. Keep IEnumerable<object[]> on older
versions.
Tuple element names document which position maps to which test parameter, and
tuple element types catch incompatible values at compile time. They do not
make DynamicData position-independent, and swapping two same-typed elements
can still compile. Do not claim otherwise. When rows need custom display names
or metadata rather than only typed positional data, use TestDataRow<T> on
MSTest 3.8+.
[TestMethod]
[DynamicData(nameof(DiscountTestData))]
public void ApplyDiscount_ReturnsExpectedPrice(decimal price, int percent, decimal expected)
{
var result = PriceCalculator.ApplyDiscount(price, percent);
Assert.AreEqual(expected, result);
}
// ValueTuple -- preferred (MSTest 3.7+)
public static IEnumerable<(decimal price, int percent, decimal expected)> DiscountTestData =>
[
(100m, 10, 90m),
(200m, 25, 150m),
(50m, 0, 50m),
];When you need metadata per test case on MSTest 3.8+, use TestDataRow<T>:
public static IEnumerable<TestDataRow<(decimal price, int percent, decimal expected)>> DiscountTestDataWithMetadata =>
[
new((100m, 10, 90m)) { DisplayName = "10% discount" },
new((200m, 25, 150m)) { DisplayName = "25% discount" },
new((50m, 0, 50m)) { DisplayName = "No discount" },
];FixtureBase<TSut> or established [TestInitialize] lifecycle rather than rewriting the fixture architecture incidentally.[TestInitialize] only for async initialization, combined with the constructor for sync parts[TestCleanup] for cleanup that must run even on failureTestContext via constructor only on MSTest 3.6+; otherwise use the instance property.[TestClass]
public sealed class RepositoryTests
{
private readonly TestContext _testContext;
private readonly FakeDatabase _db; // readonly -- guaranteed by constructor
public RepositoryTests(TestContext testContext)
{
_testContext = testContext;
_db = new FakeDatabase(); // sync init in ctor
}
[TestInitialize]
public async Task InitAsync()
{
// Use TestInitialize ONLY for async setup
await _db.SeedAsync();
}
[TestCleanup]
public void Cleanup() => _db.Reset();
}[AssemblyInitialize] -- once per assembly[ClassInitialize] -- once per classTestContext property injection: Constructor -> set TestContext property -> [TestInitialize]TestContext: Constructor (receives TestContext) -> [TestInitialize][TestCleanup] -> DisposeAsync -> Dispose -- per test[ClassCleanup] -- once per class[AssemblyCleanup] -- once per assemblyUse TestContext.CancellationToken with
[Timeout(milliseconds, CooperativeCancellation = true)] when the installed
MSTest version exposes the token directly (3.11+). On MSTest 3.6.4-3.10, use
TestContext.CancellationTokenSource.Token with cooperative cancellation
instead. A plain [Timeout] does not establish that the framework token will
stop in-flight work. On older versions, use a test-owned
CancellationTokenSource where cancellation itself is under test.
// MSTest 3.11+
[TestMethod]
[Timeout(5000, CooperativeCancellation = true)]
public async Task FetchData_ReturnsWithinTimeout()
{
var result = await _client.GetDataAsync(_testContext.CancellationToken);
Assert.IsNotNull(result);
}For retry, conditional execution, or parallelization requests, read Advanced MSTest patterns. Apply its version gates and keep the real tested operation, assertion, and cleanup.
For an MSTESTxxxx request, read
Advanced MSTest patterns, apply the
version-compatible fix for that rule, and rebuild to confirm the diagnostic is
gone. Prefer fixing the code over suppressing the rule.
When the user asked for repository edits and did not prohibit execution, run the
narrowest affected dotnet test command after editing. A successful process with
no discovered-test count is not verification. Require the intended test cases to
be discovered and pass.
If compilation exposes a directly coupled source issue that prevents the corrected existing suite from running (for example, a missing namespace import in the supplied production file), make only that minimum fix and rerun. Do not upgrade packages or broaden the modernization. Report the actual test count and the fixes made; never present unrun or output-free tests as passing. In the final handoff, map every requested modernization to the exact corrected construct and cite the passing test command. Do not rely on a generic "modernized" summary when expected/actual order, exact type checks, data discovery, or class shape were explicit requirements.
© dotnet, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
SKILL.md and 1 other file (references) in plugins/dotnet-test/skills/writing-mstest-tests of dotnet/skills.
Open the folder on GitHubat commit 3d38ac3
We found 2 copies of this SKILL.md (exact, near-identical or edited) in other folders, from 1 other GitHub owner. This page covers the copy in dotnet/skills, which our catalogue first saw on October 7, 2026.
Writing Mstest Tests next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| Writing Mstest Tests this skilldotnet/skills | 5.6k | 1 repos | ~5k | Automated safety check: Pass | MIT | |
| ScottPlot Test RunnerScottPlot/ScottPlot | 6.8k | — | ~308 | Automated safety check: Pass | MIT | |
| Raven Test Triagemarinasundstrom/raven | 108 | — | ~1.4k | Automated safety check: Pass | MIT | |
| Run Testsrunceel/ReactiveProperty | 944 | — | ~3.6k | Automated safety check: Pass | MIT | |
| MAUI UI Test Writerdotnet/maui | 23k | — | ~3k | Automated safety check: Pass | MIT | |
| MAUI XAML Unit Test Writerdotnet/maui | 23k | — | ~742 | Automated safety check: Pass | MIT |
ScottPlot/ScottPlot
Run or add ScottPlot 5 tests. Use for unit-test and cookbook-test work; unless explicitly asked otherwise, restrict manual test execution to the Unit Tests…
marinasundstrom/raven
Testing and stabilization workflow for the Raven compiler test suite.
runceel/ReactiveProperty
Runs .NET tests with dotnet test. An agent skill from runceel/ReactiveProperty.
dotnet/maui
Writes UI tests that reproduce a GitHub issue in .NET MAUI and keeps iterating until the tests actually fail, proving they catch the bug.
dotnet/maui
Writes a paired .xaml and .xaml.cs unit test for a .NET MAUI issue that is about XAML behavior itself, such as parsing, XamlC output or generated code.
mitchdenny/hex1b
Agent for diagnosing and fixing flaky terminal UI tests in the Hex1b test suite.
dotnet/skills
Resolves .NET runtime frames in Apple .ips crash logs to function names, source files and line numbers using dSYM symbols, atos and the Microsoft symbol server.
dotnet/skills
Resolves native crash frames from .NET Android tombstones to function names, source files and line numbers using BuildIds, Microsoft's symbol server and llvm-symbolizer.
dotnet/skills
Scans C# and .NET code for about 50 performance anti-patterns and reports prioritized findings with concrete fixes, at a scan depth you choose.
dotnet/skills
Statically pairs source files with test files to list code that no test references, using Roslyn for C# or tree-sitter for many languages, with no build.
dotnet/skills
Activate this skill when BenchmarkDotNet (BDN) is involved in the task — creating, running, configuring, or reviewing BDN benchmarks.
dotnet/skills
Makes .NET projects compatible with Native AOT and trimming by resolving IL trim and AOT analyzer warnings through annotations rather than suppressions.
Works with
Categories
ALWAYS USE when asked to fix, rewrite, update, improve, modernize, show corrected code for, or explain existing MSTest tests or MSTest-specific configuration. Writing Mstest Tests is an agent skill from dotnet/skills, published by the product's own GitHub organization. ALWAYS USE when asked to fix, rewrite, update, improve, modernize, show corrected code for, or explain existing MSTest tests or MSTest-specific configuration.
Writing Mstest Tests fits situations like: show corrected code for; explain existing MSTest tests; MSTest-specific configuration; review when corrected code.
Run `npx skills add dotnet/skills --skill writing-mstest-tests -a claude-code`. Or copy the skill folder (plugins/dotnet-test/skills/writing-mstest-tests in dotnet/skills) into .claude/skills/writing-mstest-tests in your project. Claude Code loads it when a task matches its description.
Run `npx skills add dotnet/skills --skill writing-mstest-tests -a codex`. Or copy the skill folder (plugins/dotnet-test/skills/writing-mstest-tests in dotnet/skills) into .agents/skills/writing-mstest-tests in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add dotnet/skills --skill writing-mstest-tests -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/writing-mstest-tests, .gemini/skills/writing-mstest-tests, .github/skills/writing-mstest-tests and .opencode/skills/writing-mstest-tests in your project.
Going by SKILL.md and its folder, Writing Mstest Tests needs the command-line tools its instructions call (dotnet).
SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.
Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.
Writing Mstest Tests is published under the MIT licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.
About 5k tokens (SKILL.md is roughly 20k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 1.1k tokens, read only when the agent opens those files.
Skills that share tags, products or a category with Writing Mstest Tests: ScottPlot Test Runner (ScottPlot/ScottPlot, 6.8k stars), Raven Test Triage (marinasundstrom/raven, 108 stars), Run Tests (runceel/ReactiveProperty, 944 stars) and MAUI UI Test Writer (dotnet/maui, 23k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
dotnet (a GitHub organization, an official publisher) maintains it in dotnet/skills, which has 5,585 GitHub stars. The repository holds 93 skills in this directory. The repository was last updated on October 9, 2026.
Source: dotnet/skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.