From 84f2ad16bde79c8009f3276aba1d556f8f350177 Mon Sep 17 00:00:00 2001 From: nullforce Date: Wed, 1 May 2019 22:28:38 -0500 Subject: [PATCH] Add test results file --- azure-pipelines.yml | 6 ++++++ build/Build.cs | 2 ++ 2 files changed, 8 insertions(+) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 18d4a1d..73d6119 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -20,6 +20,12 @@ steps: displayName: 'Run the Test target' continueOnError: false +- task: PublishTestResults@2 + inputs: + testResultsFormat: 'VSTest' + testResultsFiles: 'output/**/*.trx' + failTaskOnFailedTests: true + - task: CopyFiles@2 inputs: SourceFolder: 'output' diff --git a/build/Build.cs b/build/Build.cs index 70a26e0..0a73c96 100644 --- a/build/Build.cs +++ b/build/Build.cs @@ -87,6 +87,8 @@ class Build : NukeBuild DotNetTest(s => s .SetProjectFile(testProject) .SetConfiguration(Configuration) + .SetResultsDirectory(OutputDirectory / "TestResults") + .SetLogger("trx") .EnableNoBuild() ); }