I'm a happy user of CakeBuild and TeamCity. I'm a firm believer of build scripts versus configuring the actual build server with a bunch of steps. I've been having one problem though. Test results from e.g. xUnit and MSTests wasn't being picked up by TeamCity anymore. Apparently there was a change in the output of the test runner for .NET Core. But there's a quick solution. In my Cake build script, I just needed to add one little line:
Logger = "console;verbosity=normal"
You can see a sample of a real change to Ensure.That's build.cake file My step to run the unit tests looks like this:
Task("UnitTests").Does(() => {
var settings = new DotNetCoreTestSettings {
Configuration = config.BuildProfile,
NoBuild = true,
Logger = "console;verbosity=normal"
};
foreach(var testProj in GetFiles($"{config.SrcDir}tests/**/UnitTests.csproj")) {
DotNetCoreTest(testProj.FullPath, settings);
}
});
Result? Before and after build:
I've seen some suggestions to use Verbosity = DotNetCoreVerbosity.Detailed
, but that didn't work for me.
Thats all for this time, I'll try and pick up the blogging again.
//Daniel