如何使用ADO Rest API获取特定版本中的测试运行列表 [英] How to use ADO Rest API to get the list of test run in a specific build

查看:51
本文介绍了如何使用ADO Rest API获取特定版本中的测试运行列表的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

从ADO Rest API中,

解决方案

首先,使用结果-列表 api,以获取测试运行的测试结果:

  GET https://dev.azure.com/{organization}/{project}/_apis/test/Runs/{runId}/results?api-version=6.0 

From the ADO Rest API, https://docs.microsoft.com/en-us/rest/api/azure/devops/?view=azure-devops-rest-6.1,can you please tell me how can I get the list of tests and their results of a specific build?

In summary, I am looking for the information in 'test' tab of a particular build via REST API:

解决方案

First, use Runs - Query api and pass the optional build id to get the test run ID in the build:

GET https://dev.azure.com/{organization}/{project}/_apis/test/runs?minLastUpdatedDate={minLastUpdatedDate}&maxLastUpdatedDate={maxLastUpdatedDate}&buildIds={buildIds}&api-version=6.0

Then use Results - List api to get the test results of the test run:

GET https://dev.azure.com/{organization}/{project}/_apis/test/Runs/{runId}/results?api-version=6.0

这篇关于如何使用ADO Rest API获取特定版本中的测试运行列表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆