I am trying to get the Code Coverage tab to show up after I run the VsTest task. According to one of the answers to this question: /a/68344339/3866585
VsTest may interfere with the PublishCodeCoverageResults@2 task.
Is there a way to get the Code Coverage tab show up in the pipeline summary with VsTest? The PublishCodeCoverage step does show that the data is being published to TFS server, but the tab doesn’t show up.
This is what’s in my YAML pipeline code:
- task: VSTest@2
displayName: Test Assemblies
condition: ${{ parameters.runVsTests }}
inputs:
testAssemblyVer2: |
***test*.dll
!**obj**
platform: $(buildPlatform)
configuration: $(buildConfiguration)
searchFolder: '$(System.DefaultWorkingDirectory)'
resultsFolder: '$(build.ArtifactStagingDirectory)/Test/Results'
otherConsoleOptions: '/collect:"Code Coverage;Format=Cobertura"'
codeCoverageEnabled: true
- task: PublishCodeCoverageResults@2
inputs:
summaryFileLocation: '$(build.ArtifactStagingDirectory)/Test/Results/**/*.xml'