unit-testing Guide unit testing in Visual Studio for C# Running unit tests within Visual Studio

Help us to keep this website almost Ad Free! It takes only 10 seconds of your time:
> Step 1: Go view our video on YouTube: EF Core Bulk Extensions
> Step 2: And Like the video. BONUS: You can also share it!

Example

  • To see you unit tests go to Test -> Windows -> Test Explorer
  • (Figure 1)

enter image description here

  • This will open an overview of all the tests in the application
  • (Figure 2)

enter image description here

  • In the figure above you can see that the example has one unit test and it hasn’t been run yet

  • You can double-click on a test to go to the code where the unit test is defined

  • You can run single or multiple tests with the Run All or Run…

  • You can also run tests and change settings from the Test menu (Figure 1)



Got any unit-testing Question?