Export Cake dotnet core test output to TeamCity

I am looking for a way to export a test result from a .NET Core application to TeamCity via Cake build script.

I am currently just running:

DotNetCoreTest("./src/MyTestProject");

But I don't see anything in the ITeamCityProvider or DotNetCoreTest documentation

The above block of code works from the command line, but I cannot find a way to publish the test results to the build server.

Hope someone can help

+4
source share
1 answer

NUnit test runner .NET Core --teamcity, TeamCity (. commit 323fb47).

script , ArgumentCustomization:

Task("Test")
   .Does(() =>
{
    DotNetCoreTest(
        "path/to/Project.Tests",
        new DotNetCoreTestSettings
        {
            ArgumentCustomization = args => args.Append("--teamcity")
        });
});
+4

Source: https://habr.com/ru/post/1668331/


All Articles