Export tests results from Azure DevOps

10,999

Solution 1

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.

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.

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.

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.

enter image description here enter image description here

Share:
10,999

Related videos on Youtube

Sevenate
Author by

Sevenate

Passionate about nice and wise UI   W ASD

Updated on July 09, 2022

Comments

  • Sevenate
    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.

    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?

    • Sevenate
      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
      FDM over 4 years
      Okay. What I meant was: the Test Plans license is pretty expensive, so it's a shame to only use it for test reporting.
  • Sevenate
    Sevenate almost 5 years
    Ok, yeah, but what if you don't have test plans, suites or cases and only have unit tests projects in the solution?
  • Sevenate
    Sevenate over 4 years
    Just 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
    Big Ian over 2 years
    That's great but how do I get the trx it's generated from?

Related