Codebelt
v0.9.0

.NET Test

Replace factory wrappers and test-owned hosts with verified test infrastructure started by the application entry point.

.NET Engineering 0 installs .NET test projects xUnit v2 and v3 ASP.NET Core, console, and worker apps PowerShell 7+

Overview

.NET Test bootstraps and migrates xUnit projects onto Codebelt's test-host abstractions. It covers ordinary unit tests plus functional tests for ASP.NET Core, console, and worker applications without rebuilding the production composition root inside the test project.

For hosted applications, the defining rule is simple: the application entry point starts the host. Focused tests use WebApplicationTestFactory or ApplicationTestFactory; shared fixtures use WebApplicationTest or ApplicationTest with the matching managed fixture.

Concepts

  • Role-aware selection: repository inspection classifies each selected project as a unit, web-functional, or console/worker-functional test project before choosing a pattern.
  • Entrypoint-owned startup: Codebelt hosts replace WebApplicationFactory wrappers and hand-built test HostBuilder composition roots.
  • Behavior-preserving migration: target frameworks, package ownership, test names, configuration, isolation, and disposal remain intact.
  • Verified completion: deterministic inspection checks the selected host pattern and rejects migrations that only rename or wrap the old infrastructure.

Installation

npx skills add https://github.com/codebeltnet/agentic --skill dotnet-test

Usage guidance

Use this skill to create an xUnit test project, modernize xUnit v2 to xUnit v3 with Microsoft Testing Platform, or migrate hosted tests away from Microsoft and hand-rolled host factories. It inspects the repository first, resolves compatible package versions through NuGet, and preserves central or project-owned package management.

For migrations, point it at the relevant test project and state any required scope boundary. The workflow is complete only when the selected Codebelt pattern is present, legacy host plumbing is absent, and restore, build, and tests pass with a non-zero test count.