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.
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?
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.
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.
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.
There is a simpler way to download the test results in trx format if you do not have Test Plans.
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.
Then you will be able to click on Tests Runs, select the run you want to download, and simply download the attachment.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With