Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Export tests results from Azure DevOps

I might be missing something, but can't find a way to export tests run results from the project's build pipeline execution page in Azure DevOps.

Azure DevOps - Test Results page

There is a "Download logs" option, of cause, where you technically can find logs from tests execution step as well among other things, but that doesn't seems to be the best/proper way to get that kind of data on a regular basis for regulations/audit/documentation purpose compared to how it is possible to get test results from other build systems right out-of-the-box (TeamCity/Jenkins etc).

So what would be the best approach to get this kind of data out of the system - custom task or else?

like image 307
Sevenate Avatar asked Aug 30 '19 18:08

Sevenate


People also ask

How do I export a test case from Azure DevOps?

Once you log into the Azure DevOps project go to Test Plans and choose one of the test plans or create a new one. Post that when you open the plan you can see 3 tabs “Define”, “Execute” and “Charts”. Under Define tab you will see up and down arrows, that is import and export options.

How do I export Azure DevOps to Excel?

A: If you want to export a query to Excel, you can do that from Excel or Visual Studio/Team Explorer. Or, to export a query directly from the web portal Queries page, install the Azure DevOps Open in Excel Marketplace extension. This extension adds an Open in Excel link to the toolbar of the query results page.

How do I export from Azure DevOps?

From any query, you can export a list of work items as a comma-delimited list. Open the query, choose the actions icon, and choose Export to CSV. To learn more, see Bulk import or update work items using CSV files. Requires Azure DevOps Server 2019 Update 1 or later version.


2 Answers

There is a simpler way to download the test results in trx format if you do not have Test Plans.

  1. Go to the Tests tab from your build pipeline run.
  2. Select your Test Run from the bottom pane (top level row for your run). A dialog should open on your right with options like Debug, Attachments, etc.
  3. Click on the Attachments tab and you will find your trx file here.
like image 84
Notarobot Avatar answered Sep 21 '22 12:09

Notarobot


I found that today, it will actually work. Even if you don't have test plans or anything, published tests artifacts will go into Tests Plan -> Runs.

Azure DevOps left nav panel - Test Plans - Runs

Then you will be able to click on Tests Runs, select the run you want to download, and simply download the attachment.

like image 43
David Peicho Avatar answered Sep 19 '22 12:09

David Peicho