作为计划构建的一部分,我运行并发布了多个具有不同测试运行标题的测试。
我的场景是,在发布管道期间,我想获取为正在创建的版本的构建发布的每个测试运行标题的测试摘要。
可以使用哪些 Azure DevOps API 或 API 组合来实现此目的?
谢谢,
阿努巴夫。
有了BuildId,
第1步:使用这个apihttps://dev.azure.com/{organization}/{project}/_apis/test/ResultDetailsByBuild?buildId={buildId} https://dev.azure.com/%7Borganization%7D/%7Bproject%7D/_apis/test/ResultDetailsByBuild?buildId=%7BbuildId%7D,通过此 api 而不是从 URL 获取运行 id。
步骤2:获取https://dev.azure.com/{organization}/{project}/_apis/test/runs/{runId}?api-version=6.0 https://dev.azure.com/%7Borganization%7D/%7Bproject%7D/_apis/test/runs/%7BrunId%7D?api-version=6.0获得详细的测试运行结果。
for 参考 https://developercommunity.visualstudio.com/content/problem/394858/vsts-vstest-build-details-tests-tab-error-tfswebap.html
希望这会有所帮助:)
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)