[英]Get test suite id using Azure DevOps API
I am trying the below API, to get the suite ID using test case ID,我正在尝试以下 API,以使用测试用例 ID 获取套件 ID,
http://tfsb.xxx.com/xxx/xxxSoftware/_api/_testManagement/suites?testCaseId=185295&api-version=5.0
But I always get the below response:但我总是得到以下回应:
404 - File or directory not found.
404 - 未找到文件或目录。
Can any you please tell me how to get the suite ID using testcase ID for Azure DevOps?您能告诉我如何使用 Azure DevOps 的测试用例 ID 获取套件 ID 吗?
这不是正确的 API,根据文档,有一个特殊的 API - Get Suites By Test Case Id :
GET https://dev.azure.com/{organization}/_apis/test/suites?testCaseId={testCaseId}&api-version=5.0
Been struggling with this all morning.整个上午都在为此挣扎。 Finally figured out how to get it to work.
终于想出了如何让它工作。 You should not put the project / team name in the URL.
你不应该在URL把项目/团队名称。 For example, most API calls look like:
例如,大多数 API 调用如下所示:
https://dev.azure.com/{organization}/{project}/_apis/
However, the correct URL for this api call should look like:但是,此api 调用的正确 URL 应如下所示:
https://dev.azure.com/{organization}/_apis/
In other words just put the base organization but do not put the project/team.换句话说,只放置基础组织,而不放置项目/团队。
Same if you are using a dedicated organization url, instead of:如果您使用专用的组织 URL,则相同,而不是:
https://mycompany.visualstudio.com/Bigproject/_apis/
you must do你必须做
https://mycompany.visualstudio.com/_apis/
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.