From 4cc261e056e7c529c8b60aa86c80966606c9bd08 Mon Sep 17 00:00:00 2001 From: Justin M <63619224+JustinMDotNet@users.noreply.github.com> Date: Mon, 4 Oct 2021 11:12:36 -0700 Subject: [PATCH] Kusto - Added code coverage to Build (#1253) * Modified build.yml to run code coverage and modified logfilename to nunit.trx * Changed logfilename for Kusto and SqlTools for Unit Tests. Added codeCoverage flag to SqlTools * Added Kusto PublishTestResults task. Changed SqlTools testresult to use SqlTools.ServiceLayer.UnitTests.trx * Added Microsoft.NET.Test.Sdk to Kusto.ServiceLayer. Changed build.yml to not PublishTestResults for Kusto. * Removed reference to Microsoft.NET.Test.Sdk in Kusto.ServiceLayer. Removed PublishTestResults from ServiceLayer.UnitTests. * Added testRunTitle to Kusto and SqlTools test tasks --- azure-pipelines/build.yml | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/azure-pipelines/build.yml b/azure-pipelines/build.yml index 312ac50d..98b4ef98 100644 --- a/azure-pipelines/build.yml +++ b/azure-pipelines/build.yml @@ -72,14 +72,16 @@ steps: inputs: command: test projects: test/Microsoft.SqlTools.ServiceLayer.UnitTests - arguments: '--logger "trx;LogFileName=xunit.trx"' + testRunTitle: SqlTools.ServiceLayer.UnitTests + arguments: '--configuration $(buildConfiguration) --collect "Code coverage"' - task: DotNetCoreCLI@2 displayName: 'dotnet test test/Microsoft.Kusto.ServiceLayer.UnitTests' inputs: command: test projects: test/Microsoft.Kusto.ServiceLayer.UnitTests - arguments: '--logger "trx;LogFileName=xunit.trx"' + testRunTitle: Kusto.ServiceLayer.UnitTests + arguments: '--configuration $(buildConfiguration) --collect "Code coverage"' - task: Npm@1 displayName: 'npm install -g gulp-cli' @@ -210,10 +212,4 @@ steps: command: push packagesToPush: '$(Build.SourcesDirectory)/artifacts/nugetPackages/**/*.nupkg;!$(Build.ArtifactStagingDirectory)/**/*.symbols.nupkg' publishVstsFeed: '2191dd5f-4aec-491b-ac50-568bbc331c8a' - allowPackageConflicts: true - -- task: PublishTestResults@2 - displayName: 'Publish Test Results **/xunit.trx' - inputs: - testResultsFormat: VSTest - testResultsFiles: '**/xunit.trx' \ No newline at end of file + allowPackageConflicts: true \ No newline at end of file