Export tests results from Azure DevOps
Solution 1
There is a simpler way to download the test results in trx format if you do not have Test Plans.
- Go to the Tests tab from your build pipeline run.
- 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.
- Click on the Attachments tab and you will find your trx file here.
Solution 2
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.
Solution 3
You can export test plans, test suites, and test cases from Test Plans. Select the details that you want in the report. Then email or print this report for review.
Related videos on Youtube
Comments
-
Sevenate almost 2 years
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?
-
Sevenate almost 5 years@DanielMann the text logs have a lot of not really relevant information, so you have to clean it up manually (or come up with some sort of not very trivial automation) + I would prefer to have such data exportable in machine-friendly formats like csv or xml and print-friendly formats like html or pdf. Note that you can do all this out of the box with TeamCity.
-
FDM over 4 yearsOkay. What I meant was: the Test Plans license is pretty expensive, so it's a shame to only use it for test reporting.
-
-
Sevenate almost 5 yearsOk, yeah, but what if you don't have test plans, suites or cases and only have unit tests projects in the solution?
-
Sevenate over 4 yearsJust a note for everybody, that attached file will have TRX extension (MS Tests results file format), but the content is basically XML with all necessary information about tests execution, so it should be easy to transform/convert it to some shiny HTML or PDF later if necessary. A few tools that I've found today (year 2019) that were claiming can convert TRX into HTML turns out to be out of date and were crashing most likely because of not supporting latest VS2019 MS Tests results file format. So for now I'm fine with that raw TRX/XML.
-
Big Ian over 2 yearsThat's great but how do I get the trx it's generated from?