I am trying to report the XUnit results of the .NET Core XUnit project in Azure DevOps. The build process is written in a Cake Build script which is called by the Azure DevOps build pipeline. The XUnit tests run, but they are only reporting the bare minimum to the CLI. I want summary and details written to a file: JSON, XML, it doesn't matter too much. Here is sample code currently:
Task("UnitTests")
.Does(() =>
{
DotNetCoreTest(
testProject,
new DotNetCoreTestSettings()
{
Configuration = configuration,
NoBuild = true
}
);
});
The Cake script is being run by the Powershell script though a Powershell task in the Build Pipeline.
What do I have to do to run dotnetcoretest in Cake to make it report out to a format and location that I can use Azure DevOps? I tried using the "-xml" argument and that did not work for dotnet test.
Do I have to add a task in the Build Pipeline in Azure DevOps to grab the XUnit results from the Cake script?
How do I view the XUnit tests in Azure DevOps?