azure-pipelines-tasks: Code Coverage Charts not shown on VSTS
Environment
- Azure Pipelines
- Account Name: slb1-swt
- Project: planck
- Build Definition Name: Delete-Me
- Build Number: 912449
- Agent - Private:
- OS: Windows Server 2012
Issue Description
I’ve been able to have my .NET Solution build successfully, using the Visual Studio Build Task, and have run the Visual Studio Test Task to execute Unit Tests with code coverage enabled.
Everything seems to build and test fine with a .coverage file being generated.
However, the Code Coverage tab on the VSTS Build page only gives me the option to Download code coverage results
. That downloaded results (.coverage) file does open in Visual Studio showing me the correct coverage information.
However, I was hoping that it would show charts directly in the Code Coverage Tab. But I don’t see anything. Is there something that needs to be enabled for that to work? Is this supported in .NET 4.6.1 projects?
The following is by build definition yaml
queue:
name: ...
demands:
- msbuild
- visualstudio
steps:
- task: VSBuild@1
displayName: 'Build Dummy.sln'
inputs:
solution: 'Dummy.sln'
configuration: Release
restoreNugetPackages: true
- task: VisualStudioTestPlatformInstaller@1
displayName: 'Visual Studio Test Platform Installer'
- task: VSTest@2
displayName: 'Test'
inputs:
testAssemblyVer2: |
**\*.UnitTest.dll
!**\*TestAdapter.dll
!**\obj\**
vsTestVersion: toolsInstaller
overrideTestrunParameters: '-Platform x64'
codeCoverageEnabled: true
code: .NET Framework 4.6.1
agent version: 2.141.1
visual studio test version: 2.142.11
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Reactions: 2
- Comments: 20 (9 by maintainers)
@PBoraMSFT We found the summary page to be very lacking.
I run code coverage for TypeScript, Python and C# code projects. The above picture is from our build - the top bar is for Python, bottom for C#.
I have 2 publish code coverage tasks with Cobertura for TS and Python.
If memory serves me right, this page is a regression from TFS 2015, which had much more comprehensive code coverage page.
@lucas-natraj - there are two aspects here: