AzDO YAML pipeline publish Html test result - azure-devops

Azure DevOps still doesn't have a built in way to publish test html reports to the pipeline. This request is over a year old now and still no announcement on it being on the roadmap.
This article suggests it is possible by naming the file index.html. However, I'm not seeing how the file is published - can anyone help?

Sorry, for now we do not have any build-in feature to directly publish html file and have the ability to view the HTML report inline as a web page on Azure pipelines.
Azure DevOps Coverage page show index.html on the web. However, the
CSS and Javascript should be included. For this purpose we can use
HTMLInline to include CSS and Javascript on the index.html.
The article you are referring, seems related to code coverage not test page. There is a code coverage tab next to Tests tab.
According to the description, the workaround seems to modify the original index.html file of Code Coverage and display something on it. If so, there is no need to publish, Azure DevOps will find the index.html and auto display info of it.
That's not a common way to publish html report. Suggest you use Publish Pipeline Artifact task to publish generated html reports and then download to view them locally.
Or you could also give a try with 3rd-party extension-- Publish HTML

Related

Schedule deploy rmarkdown in GitHub

Is there any way to create a schedule to deploy a Rmarkdown in HTML format? I have a report that uses web scraping data, but the report in GitHub is in a fixed HTML, I want the report to update weekly in an automated way.
Any tips?
Note: I don't want to use shiny
Jenkins or cron would require local setup/installation.
GitHub Actions are executed on GitHub side, and can be scheduled.
For instance: "Use GitHub actions with R Markdown and Distill" from
Etienne Bacher: there are quite a few GitHub Actions for the R language to take inspiration from.

Showing Code Coverage Report with Azure DevOps

I'm using Microsoft Unit Tests to validate my solutions via Azure DevOps Pipelines. I am able to see tests being executed and the % of code coverage
However, I can't see the code coverage results (or they won't render)...
Here is my publish code coverage task - am I missing something to have it render here?
This is a known issue on Azure devops. Now, we could only download the report, and open it with Visual Studio.
Azure devops only support the download link for .coverage files currently. The white page you see is a UI glitch. This scenario is only supposed to render a download link to the coverage file.
Besides, this issue has been submitted in this earlier suggestion ticket linked here:
support vstest .coverage "code coverage" build results tab
This feature request is On Roadmap, I believe it will be released soon, you can follow this thread to know its latest feedback.
In addition, we found a similar case and I have tested via the answer, set the code coverage tool to Cobertura, then I get the code coverage report in the Azure DevOps pipeline.

How to publish html reports in azure pipelines?

I want to take up other reports like extent report in selenium needs to be taken into azure pipelines to see the different results than azure default one.
Publishing html report in Azure pipelines which is not support at present. There has been a related user voice:
Support for generic HTML Publishing inside Build and Release Pipelines
https://developercommunity.visualstudio.com/content/idea/491426/support-for-generic-html-publishing-inside-build-a.html
You could vote up it and our PM will kindly review it. In other words, html reports for selenium automation test could not view inline as a web page at the moment. As a workaround, you have to download the html report files locally and check it.

Publish an Azure DevOps Wiki as a stand-alone static site

I have set up a wiki in Azure DevOps and I want to set up a pipeline that takes the markdown files, transform them into HTML and publish them as a stand-alone static web site. When someone commits changes in the markdown files I want to build new static files to the site using a pipeline in Azure DevOps.
Gatsby is a platform that I'm somewhat familiar with, but the wiki consists of markdown files only + a file called "order" that determines the order of the documents in the wiki.
Does anyone have an idea as to how I should set this up?
You need this setup:
Expose your markdown files by an API. Azure should have some kind of serverless lambda function service. The query result should be an array or list of the files you need in the order you need them. It's best to let your Azure based API deal with the order file. Gatsby should only be concerned with building your site in the right order as supplied by your API.
Call your markdon API during the Gatsby build process. See the docs for how to fetch data at build time.
Create a template page for all your wiki pages. See the Gatsby tutorial part 7.
You need to create the wiki pages using the Gatsby node API. Use the createPages function.
PS: I'm interested in your decision what serverless lambda function service you would use because I am running into a similar use case. Feel free to comment how you solved the 1. of your setup.

Azure DevOps add custom Tab to Build Summary

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?
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.
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.