When using TeamCity and the .NET Runner Type to execute a "dotnet test"-command during the build you will have to add the TeamCity test adapter-package for the test results to show up in TeamCity UI.
In this image we see:
-
A build where the test adapter was added to the test-project
-
A build where the test adapter was not added to the test-project.
To make sure test results are shown in TeamCity during the build, add this package to the csproj-file of the test project:
<PackageReference Include="TeamCity.VSTest.TestAdapter" Version="1.0.37" />