A test runner adapter connects a testing framework to test execution tools. It lets dotnet test and Visual Studio discover and execute tests written with frameworks such as xUnit, NUnit, Fixie, or MSTest. section 35.1
A test project typically includes these pieces:
- The .NET Test SDK provides the underlying test execution support. section 35.1
- A test framework, such as xUnit, defines tests and assertions. section 35.1
- The framework-specific adapter hooks the tests into dotnet test and Visual Studio Test Explorer. section 35.1
An xUnit test project
Creating an xUnit test project with dotnet new xunit adds Microsoft.NET.Test.Sdk, xunit, and xunit.runner.visualstudio NuGet packages. After adding tests, run dotnet test in the project directory or use Test Explorer in Visual Studio; both approaches execute the project’s tests. section 35.7
