Reputation: 2392
I want to add a custom tab to my build summary.
Inside these tab I want to display the results of the PowerShell Test Code Coverage task. The results are about 50-200 *.htm
reports generated by ReportGenerator.
I try to achive with Write-Host "##vso[task.addattachment type=Distributedtask.Core.Summary;name=Report;]$localFile"
but the amount of reports make this option not senseful.
Best case solution would be, if could display the reports like:
AssemblyNameA.dll
collapsed:true
index.htm collapsed:false TargetAssemblyA.htm TargetAssemblyB.htm TargetAssemblyC.htm
AssemblyNameB.dll
collapsed:false
index.htm collapsed:false TargetAssemblyA.htm TargetAssemblyB.htm TargetAssemblyC.htm
Is there a way to implement that?
Upvotes: 2
Views: 6185
Reputation: 76690
Azure DevOps add custom Tab to Build Summary
First, I suppose you are using Azure DevOps Server 2019. Am I right? This is a known issue for Azure DevOps Server 2019:
Code coverage tab missing in Azure DevOps Server
A fix for this issue has been released! Install the most recent release from https://visualstudio.microsoft.com/downloads/.
Second, if you want to create a real custom summary tab, just like Wouter said, you need to write an extension by Visual Studio Services Web Extension SDK.
MS team has provided a great sample on github Build Results Enhancer, you can check this sample for some more details.
Hope this helps.
Upvotes: 4
Reputation: 39898
To publish the coverage reports created by ReportGenerator you can use the Publish Code Coverage Results task. You need to make sure the format that ReportGenerator creates matches to what the Publish Code Coverage Results task expects.
Upvotes: 0