dotnet test runs the tests in a .NET test project using the .NET SDK, regardless of whether the project uses xUnit, NUnit, MSTest, or another compatible framework. section 35.1
Running the command follows a predictable sequence:
- Run dotnet test from a test-project folder to restore dependencies, build the project, and execute its tests. section 35.3
- Run it from a solution folder to execute all test projects referenced by the solution file. section 35.3
- Use the same .NET SDK infrastructure as Visual Studio's test runner, producing equivalent results. section 35.1 section 35.3
Run a test project
From the unit-test project's folder, run dotnet test. The command restores and builds the test project, then reports the results of its tests. section 35.3
Figure 35.3 You can run tests from the command line using dotnet test. This restores and builds the test project before executing all the tests in the project.
A command-line figure shows dotnet test restoring and building a test project before executing its tests. section 35.3

