azure-devopsazure-pipelinesvstest

Where to find output of tests using Console.write in Azure Pipeline


I've create a build pipeline for C# in Azure DevOps and it builds and executes the tests properly. What I'm searching for is where to find the output of my custom output that I create using Console.Writeline. An example of the statement I use is:

Console.WriteLine("Found optimal value {0} in {1} seconds. Max Time allowed: {2} seconds.", var1.ToString(), var2.ToString, var3.ToString());

The entry in my yaml file for the build pipeline is:

- task: VSTest@2
  inputs:
    platform: '$(buildPlatform)'
    configuration: '$(buildConfiguration)'
    collectDumpOn: always

Solution

  • Turns out the test results are stored in a .trx file. So I pushed this file to Azure blob and ran my reports from the contents of this file.