Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Write, run, or repair .NET tests that use TUnit. Use when a repo uses `TUnit`, `TUnit.Playwright`, `[Test]`, `[Arguments]`, `ClassDataSource`, `SharedType.PerTestSession`, or Microsoft.Testing.Platform-based. USE FOR: the repo uses TUnit; you need to add, run, debug, or repair TUnit tests; the repo uses Microsoft.Testing.Platform-based test execution. DO NOT USE FOR: xUnit projects; MSTest projects. INVOKES: inspect the repository context, edit targeted files, and run relevant build, test, lint,
.claude/skills/managedcode-tunit/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-07 | ✗→✓ | ▲ Improved | 14% | 0% |
| case-09 | ✗→✓ | ▲ Improved | 179% | 0% |
| case-11 | ✗→✓ | ▲ Improved | 90% | 0% |
| case-12 | ✗→✓ | ▲ Improved | 55% | 0% |
| case-13 | ✗→✓ | ▲ Improved | 31% | 0% |
ClassDataSource<...>(Shared = SharedType.PerTestSession), ParallelLimiter, TUnit.Playwright, or --treenode-filterAGENTS.mdAGENTS.md and confirm scope and constraints.Workflow through the Ralph Loop until outcomes are acceptable.Required Result Format with concrete artifacts and verification evidence.test command from AGENTS.md. If the repo has no explicit command yet, start with dotnet test PROJECT_OR_SOLUTION.WebApplicationFactory layered over shared Aspire infra when tests need Host DI services, IGrainFactory, or other runtime internalsClassDataSource<Fixture>(Shared = SharedType.PerTestSession) instead of booting distributed infrastructure per test.dotnet test ... -- --treenode-filter "...". Keep TUnit arguments after --.[Test], [Arguments], hooks, and dependencies only when they make the scenario clearer, not because the framework allows it.If TUnit is requested but not configured yet:
rg -n "TUnit|Microsoft\\.Testing\\.Platform" -g '*.csproj' -g 'Directory.Build.*' .dotnet add TEST_PROJECT.csproj package TUnitMicrosoft.NET.Test.Sdk only when the repo's chosen TUnit project shape requires it; do not blindly duplicate runner packagesAGENTS.md and CI:dotnet test TEST_PROJECT.csproj command the repo will use[Test].dotnet test TEST_PROJECT.csproj and return status: configured or status: improved.status: not_applicable unless migration is explicitly requested.--treenode-filter rather than VSTest-style --filterSharedType.PerTestSession or an equivalent reuse patternmermaidflowchart LR A["TUnit task"] --> B{"What does the test need?"} B -->|"Single component only"| C["Plain TUnit test"] B -->|"HTTP / SignalR / resource graph"| D["Shared Aspire/AppHost fixture"] B -->|"Host DI / grains / runtime services"| E["Shared Aspire/AppHost fixture + WebApplicationFactory"] B -->|"Browser automation"| F["Shared Aspire/AppHost fixture + Playwright"] C & D & E & F --> G["Run focused with --treenode-filter"] G --> H["Capture logs, artifacts, and coverage"]
Use the Ralph Loop for every task, including docs, architecture, testing, and tooling work.
status: not_applicable with explicit reason and fallback path.status: complete | clean | improved | configured | not_applicable | blockedplan: concise plan and current iteration stepactions_taken: concrete changes madevalidation_skills: final skills run, or skipped with reasonsverification: commands, checks, or review evidence summaryremaining: top unresolved items or noneFor setup-only requests with no execution, return status: configured and exact next commands.
TUnit uses Microsoft.Testing.Platform. Use --treenode-filter for filtering (not --filter), and keep runner switches after --.
bash# Run all tests dotnet test MySolution.sln # Run one test project dotnet test tests/MyProject.Tests/MyProject.Tests.csproj # Filter by class dotnet test tests/MyProject.Tests/MyProject.Tests.csproj -- --treenode-filter "/*/*/CalculatorTests/*" # Filter by category dotnet test tests/MyProject.Tests/MyProject.Tests.csproj -- --treenode-filter "/*/*/*/*[Category=Integration]" # Coverage on Microsoft.Testing.Platform dotnet test MySolution.sln -- --coverage --coverage-output coverage.cobertura.xml --coverage-output-format cobertura # Raw runner help when the repo needs direct TUnit app switches dotnet run --project tests/MyProject.Tests/MyProject.Tests.csproj -- --help
Filter syntax: /<Assembly>/<Namespace>/<Class>/<Test> with * wildcards. See references/patterns.md for full examples.
Other measured skills in the registry, with their headline benchmark lift.