我正在开发azure rest api以获取特定项目的单元测试计数,我在文档中找到了这个api。
GET https://dev.azure.com/{organization}/{project}/_apis/test/runs?api-version=6.0这给了我所有的运行id,我可以通过使用另一个api调用https://dev.azure.com/{organization}/{project}/_apis/test/Runs/{runid}/results?api-version=6.1-preview.6来获得单元测试结果,但我的问题是我的项目有多个测试管道,有没有办法通过传递管道id来获得管道特定的运行id?
发布于 2021-02-08 15:50:33
GET https://dev.azure.com/{organization}/{project}/_apis/test/runs?api-version=6.1-preview.3
我们可以在结果中找到build id。

GET https://dev.azure.com/{organization}/{project}/_apis/test/runs?minLastUpdatedDate={minLastUpdatedDate}&maxLastUpdatedDate={maxLastUpdatedDate}&buildIds={buildIds}&api-version=6.1-preview.3
我们可以从结果中找到构建id和定义id。

发布于 2021-02-08 17:19:34
您可以使用以下查询:
GET https://dev.azure.com/{organization}/{project}/_apis/pipelines/{pipelineId}/runs/{runId}?api-version=6.0-preview.1以下是您需要指定的参数:

您将获得有关此here的详细信息
https://stackoverflow.com/questions/66063067
复制相似问题