The goal here is to practice running tests programmatically.
- Make a test project
- Write a hello world unit test
- Discover the tests (via code)
- Run the tests
- Visual Studio 2019
- xUnit
- Specifically, xUnit.Runners for AssemblyRunner class
- clone the repo, restore NuGet packages, and build files
- locate full path for XUnitTestProject.dll file in the Debug folder after building
- pass this as a debug argument to the Program.cs file:
- right click TestRunnerSample.csproj within VS Solution Explorer > Properties > Debug > Command line arguments
- paste the full path of the .dll file as a string (in quotes)
- add class name to filter tests if wanted, separated by commas
- save & run