Dotnet Test
Skills for running, generating, analyzing, and improving .NET tests: test execution, filtering, platform detection, coverage, testability, and MSTest workflows.
Skills in this plugin
22- ▌ Run Tests · dotnetRun, filter, or troubleshoot .NET tests with `dotnet test`, detecting the test platform (VSTest vs Microsoft.Testing.Platform) and framework to apply the correct command syntax.
- ▌ Crap Score · dotnetCalculates CRAP (Change Risk Anti-Patterns) scores for .NET methods by combining cyclomatic complexity with code coverage data from Cobertura XML reports.
- ▌ Grade Tests · dotnetGrades individual test methods and produces a compact markdown table with a letter grade, score band, and one-line note for each test.
- ▌ Test Tagging · dotnetAnalyzes test suites across multiple languages and tags each test with standardized traits (positive, negative, critical-path, etc.) for better test categorization and coverage visibility.
- ▌ Filter Syntax · dotnetReference for test filter syntax across VSTest and MTP platforms, covering MSTest, NUnit, xUnit v3, and TUnit frameworks with examples and translation guidance.
- ▌ Mtp Hot Reload · dotnetSets up Microsoft Testing Platform hot reload to iterate fixes on failing tests without rebuilding, covering package installation, environment configuration, and the iterative workflow.
- ▌ Assertion Quality · dotnetAnalyzes test suites to measure assertion diversity, detect shallow or trivial assertions, and identify tests that lack meaningful verification.
- ▌ Coverage Analysis · dotnet bundleAnalyzes .NET project code coverage and CRAP (Change Risk Anti-Patterns) scores to identify risk hotspots, methods blocking coverage gains, and prioritize where to add tests.
- ▌ Test Gap Analysis · dotnet bundleAnalyzes production code to find gaps in existing tests by reasoning about hypothetical mutations and checking whether tests would catch them.
- ▌ Code Testing Agent · dotnet bundleGenerates and writes unit tests for any programming language using a multi-agent pipeline that researches, plans, and implements tests with build and verification steps.
- ▌ Platform Detection · dotnet bundleDetects the test platform (VSTest vs Microsoft.Testing.Platform) and test framework (MSTest, xUnit, NUnit, TUnit) from .NET project files.
- ▌ Test Anti Patterns · dotnetAudits test files for anti-patterns and quality issues, producing a severity-ranked report across multiple languages and frameworks.
- ▌ Test Smell Detection · dotnet bundleAudits test code in any language using the academic testsmells.org 19-smell catalog, producing a severity-ranked report with specific locations and actionable fixes.
- ▌ Writing Mstest Tests · dotnetWrite, create, modernize, or fix comprehensive MSTest unit tests with MSTest 3.x/4.x APIs, covering assertions, data-driven tests, lifecycle, and async patterns.
- ▌ Testability Obstacle · dotnetMUST USE for C#/.NET deterministic tests that require the smallest production seam for DateTime/Task.Delay/File/Environment/Guid/Random, static API preservation, nested/parallel overrides, or no real I/O. USE ONLY when the target workspace contains C# source plus a .csproj or .sln. DO NOT USE for audits, bulk migration, code that already has an injectable seam, or an explicit migration to a user-named existing abstraction (migrate-static-to-wrapper). Use instead of general test generation when the requested test is impossible without a production edit and seam selection is still open.
- ▌ Find Untested Sources · dotnet bundleParse source files to find which ones have no test file referencing their declared types, producing a prioritized worklist of untested files.
- ▌ Code Testing Extensions · dotnet bundleProvides file paths to language-specific extension files for the code-testing pipeline, enabling discovery of guidance for .NET, Python, TypeScript, and other languages.
- ▌ Test Analysis Extensions · dotnet bundleProvides file paths to language-specific reference files for polyglot test analysis skills, enabling framework-aware detection of test markers, assertions, and patterns across .NET, Python, TypeScript, Java, Go, Ruby, Rust, Swift, Kotlin, PowerShell, and C++.
- ▌ Migrate Static To Wrapper · dotnetMechanically replace static dependency call sites with wrapper or built-in abstraction calls across a bounded scope, such as migrating DateTime.UtcNow to TimeProvider.GetUtcNow() or File.ReadAllText to IFileSystem.
- ▌ Detect Static Dependencies · dotnetScan C# source files for hard-to-test static dependencies and produce a ranked report of static call sites by frequency.
- ▌ Generate Testability Wrappers · dotnetGenerate wrapper interfaces, default implementations, and DI registration code to make hard-to-test static dependencies in C# testable, using built-in abstractions like TimeProvider or custom wrappers.
- ▌ Scaffold Dotnet Test Project · dotnetMUST USE when an existing .NET test project was excluded from a .slnf/CI solution filter, disappeared from .sln/.slnx discovery, or lost its production ProjectReference; also for requests to set up, create, reuse, add, register, include, or repair a test project. Handles "tests pass directly but CI discovers zero", exact solution wiring, xUnit/NUnit/MSTest, and central packages. DO NOT USE to only author tests in an already-wired project (code-testing), run tests, migrate, or correct MSTest syntax/configuration without changing project or CI files (writing-mstest-tests).