Export tests results from Azure DevOps
Asked Answered
M

3

13

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?

Mundell answered 30/8, 2019 at 18:47 Comment(9)
that doesn't seems to be the best/proper way to get that kind of data Why not?Otilia
@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.Mundell
So, did you manage to export outside of the Test Plans module? Because that module is optional - I think of dropping it as we don't use Test Case items anyway.Dalmatian
@FDM, no other ways so far, unfortunately. We don't use any Test Cases either, if that matter.Mundell
Okay. What I meant was: the Test Plans license is pretty expensive, so it's a shame to only use it for test reporting.Dalmatian
@Mundell I had a question regarding the way your dashboard looks like. Could we please chat on stackoverflow?Chobot
that's unfortunate that so many web apps today go to be pretty but useless; I guess any QA after basic ISTQB craves for manageable, controllable list but MS will not give it to themMailbox
today I have a very basic, very simple need on the same screen - to sort tests by name... no, it's not possible with this bad UX neither. The same about copy paste anything from the page ... it is closed about giving you data.Mailbox
I have the same problem and don't find a solution for the same. I want to download test case execution result / outcome from Azure DevOps and there is no such option out of the box. Did anyone find a solution for the same?Kassandra
F
7

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). Click on it and then 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.

trx file can be opened in Visual Studio and then results can be copy and pasted in excel if need be.

enter image description here

Flews answered 5/10, 2021 at 22:30 Comment(2)
then a dialog should open on your right with options like Debug, Attachments, etc. I do not get this dialog - any ideas why not? 🙏Cubital
@AlexD I found that I had to click on the name of the test or test group to make the sidebar appear.Westbound
L
6

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.

Lam answered 9/12, 2019 at 11:57 Comment(1)
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.Mundell
T
2

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

Tarttan answered 2/9, 2019 at 6:25 Comment(2)
Ok, yeah, but what if you don't have test plans, suites or cases and only have unit tests projects in the solution?Mundell
That's great but how do I get the trx it's generated from?Jess

© 2022 - 2024 — McMap. All rights reserved.