Dotnet test
dotnet test is a .NET CLI command that builds a project or solution and discovers and executes its tests.
.NET in Action, Second Edition
dotnet test is a .NET CLI command that builds a test project, discovers its tests, and executes them.
- How it is used
- Runs xUnit tests after library or API test projects are scaffolded.
- How deep it goes
- Shows project setup, test execution, and failure output, but gives no command-option reference.
- Examples
- Uses Sudoku board-validity assertions and an HTTP OK response test against a controller.
- What you can do after
- Operate/configure it to run xUnit projects and use assertion failures to locate a failing test.
Read how .NET in Action, Second Edition explains dotnet test →
ASP.NET Core in Action, 3e
dotnet test is a .NET CLI command that restores and builds a test project and then runs its tests.
- How it is used
- Runs automated tests from .NET test projects through the command line or Visual Studio.
- How deep it goes
- Explains project scope, restore and build behavior, and test-runner integration without detailing individual test implementation.
- Examples
- Uses a dotnet test command, project-folder and solution-folder execution, and Visual Studio Test Explorer as concrete examples.
- What you can do after
- Operate/configure it to restore, build, and execute tests for a project or solution.
Related concepts
- .NET CLIuses · .NET CLI is the command-line toolset for creating, building, running, testing, publishing, and managing .NET applications and projects.
- solutionuses · A solution is a development container, typically represented by a .NET solution file, that organizes related projects and their build configuration.
- test projectuses · A unit test project is a software project containing automated tests that exercise application components and the dependencies needed to run them.
- testing SDKused by · A testing SDK is a software development kit that supplies project configuration and tooling for building and running tests.
- projectuses · A software project is a managed collection of source files, configuration, dependencies, and build settings that defines a software unit and how it is produced.
- test-runner adapterused by · A test-runner adapter is a software component that connects a testing framework's tests to a test runner.
These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.

