Proper test output when building with Cake, NUnit and TeamCity
You've just migrated to Cake for building your freshly upgraded NUnit test project, but TeamCity won't run your tests. Here's how to fix it.
Migrating your project to build with Cake, only to find your tests now just output "Success" even if you know your unit tests should fail, like shown below?
After all, given this very simple step in Cake, there's not much room for things to fail, right?
When using Cake to build your project, with the DotNetCoreTest command, you have to include the TeamCity.VSTest.TestAdapter nuget package, as well as the Microsoft.NET.Test.SDK.
This should ensure the tests actually run and report correctly to TeamCity: