如何在Azure DevOps中删除多个测试用例 [英] How to delete multiple test cases in Azure DevOps

查看:149
本文介绍了如何在Azure DevOps中删除多个测试用例的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在Azure DevOps中一次性删除多个测试用例.目前,门户网站一次只能删除一个.

I want to delete multiple test cases in one go in Azure DevOps. Currently, portal only allows to delete one at a time.

有什么方法可以使用PowerShell脚本或REST API来实现这一目标?

Is there any way to achieve this using PowerShell script or REST API?

推荐答案

您可以使用Test Cases - Delete 因此您可以循环测试用例的ID并将其删除.

So you can loop the test cases id's and delete them.

简单的PowerShell脚本示例:

Example for simple PowerShell script:

$url = https://dev.azure.com/testOrg/testProj/_apis/test/testcases/10?api-version=5.0-preview.1
Invoke-RestMethod -Uri $url -Method Delete -ContentType application/json

这篇关于如何在Azure DevOps中删除多个测试用例的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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