“如何使用 TFS 2018 API 从特定版本获取测试运行 ID"

编程入门 行业动态 更新时间:2024-10-09 21:22:48
本文介绍了“如何使用 TFS 2018 API 从特定版本获取测试运行 ID"的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

限时送ChatGPT账号..

我们的发布管道中有一个运行 Seleniumtests(Visual Studio 测试任务)的任务.selenium 测试运行,我们可以在运行后手动向测试运行添加附件.我们还设法添加了带有 api 的附件,但我们没有一个很好的方法来提取上传所需的 testrunid.

We have a task in our release pipeline that runs Seleniumtests(Visual studio test task). The selenium tests run and we can after the run add an attachment to the testrun manually. We also manage to add an attachment with the api but we don't have a good way to extract the testrunid that is necessary for the upload.

我们如何以一种好的方式从发布中获取测试运行 ID,以便我们可以将附件绑定到正确的测试运行.我们只设法使用 api 进行所有测试运行,这很多.

How do we in a good way get the test run id from a release so we can bind the attachment to the right testrun. We only manage to get all test runs with the api, which is alot.

我们希望使用 api 上传附件的位置

推荐答案

您可以从特定版本的测试日志中查看测试运行 ID.

You can see test run id from the test log for a specific release.

因此,最简单的方法是使用 REST API 从日志中获取特定的测试运行 ID.

So, the simplest way is getting the specific test run id with the REST API from the log.

GET https://{instance}/{project}/_apis/release/releases/{releaseId}/environments/{environmentId}/deployPhases/{releaseDeployPhaseId}/tasks/{taskId}/logs?api-version={version}

参见获取任务日志 了解详情.

编辑 获取任务日志 v5

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

更多推荐

[db:关键词]

本文发布于:2023-04-30 18:03:23,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1398103.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:如何使用   版本   测试   TFS   API

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!