From the course: Creating a DevOps Ecosystem for .NET MAUI Developers

Unlock this course with a free trial

Join today to access over 25,300 courses taught by industry experts.

Adding unit tests to CI builds

Adding unit tests to CI builds

- [Instructor] One last thing that we may want to do is run it in a unit test. For our solution, we have a simple MS test project with a single unit test. We want that to run as part of our build and for the build to fail if any test fails. Another consideration is if the unit test runs against standard .NET code or if they require platform-specific code. If they run against standard .NET code, then we'll only need to run them once and it doesn't really matter. They can run on any virtual machine operating system the version of .NET we are using can run on. However, if they do test platform-specific code, we may have to run the test project several times to compile and run for each platform. In our case, we only have standard .NET code test, so we will run on the latest Windows VM. And before we move over, we're going to take a look at our last test run that we did for the build. And we can now see that we have two jobs here. We've got the Build Main which happened on the macOS…

Contents