Try using the test reporter to report tests (#615)
authorJuan Hoyos <juan.hoyos@microsoft.com>
Thu, 14 Nov 2019 19:54:22 +0000 (11:54 -0800)
committerGitHub <noreply@github.com>
Thu, 14 Nov 2019 19:54:22 +0000 (11:54 -0800)
Use the AzDO pipeline reporter for xUnit style tests:

- This adds a per test report per run.
- Reports are now seen in the tests tab of a pipeline run as well as a tally in GitHub

eng/build.yml

index 316d7897adc0a7d0cd8af8f62b7b2eeb16ffcedc..4b0ccb13f60ec7e62a353aea28bcfd0a38ae1e92 100644 (file)
@@ -193,3 +193,17 @@ jobs:
         ArtifactName: Logs_$(_PhaseName)_$(_BuildArch)_$(_BuildConfig)
       continueOnError: true
       condition: always()
+    
+    # Publish test results to Azure Pipelines
+    - task: PublishTestResults@2
+      inputs:
+        testResultsFormat: xUnit
+        testResultsFiles: '**/*UnitTests*.xml' 
+        searchFolder: '$(Build.SourcesDirectory)/artifacts/TestResults'
+        failTaskOnFailedTests: true
+        testRunTitle: 'Tests $(_PhaseName) $(_BuildArch) $(_BuildConfig)'
+        publishRunAttachments: true
+        mergeTestResults: true
+        buildConfiguration: ${{ parameters.name }}
+      continueOnError: true
+      condition: always()
\ No newline at end of file