Add a Unit Test Project to Your Solution
- Right-click on the solution in Solution Explorer.
- Select Add → New Project.
- Choose Template: Unit Test Project
- In the Add New Project dialog, navigate to Test → Unit Test Project.
- Choose a testing framework:
- MSTest: Microsoft's testing framework.
- xUnit: A popular open-source framework.
- NUnit: Another widely-used framework.
- Name the project WebApp.UnitTest and click Create.
- In the Add New Project dialog, navigate to Test → Unit Test Project.