AzureDevOps-将“Automationstatus更新为“Automated后如何撤销?
创始人
2024-09-29 15:00:42
0

可以通过以下代码来撤销将“Automation status”更新为“Automated”:

  1. 打开“Test Plan”视图
  2. 选择要撤销更改的测试用例
  3. 点击右键,在弹出菜单中选择“历史记录…”
  4. 在历史记录中,找到要撤销的更改并选择它
  5. 点击“撤销”按钮,然后保存更改

示例代码如下:

using Microsoft.TeamFoundation.TestManagement.Client;

// Connect to the TFS server
TfsTeamProjectCollection tfs = new TfsTeamProjectCollection(new Uri("http://tfsserver:8080/tfs"));
tfs.Authenticate();

// Get the test plan
ITestManagementService tms = tfs.GetService();
ITestManagementTeamProject project = tms.GetTeamProject("project name");
ITestPlan plan = project.TestPlans.Find(1);

// Find the test cases to undo the update for
ITestCaseCollection testCases = plan.RootSuite.AllTestCases;
foreach (ITestCase testCase in testCases)
{
    if (testCase.Title == "Test Case Title")
    {
        // Undo the update
        testCase.Actions.RemoveAt(0);
        testCase.Actions.Add(new Microsoft.TeamFoundation.TestManagement.Client.DesignStep()
        {
            ExpectedResult = "Expected result",
            Description = "Description",
            StepNumber = 1
        });

        // Save the changes
        project.WitBatchSave(testCase.WorkItem);
        break;
    }
}

其中,“Test Case Title”应该替换为要撤销更改的测试用例的标题。

相关内容

热门资讯

普及知识!xpoker辅助控制... 普及知识!xpoker辅助控制,德普之星辅助软件,分享教程(有挂技巧)准备好在德普之星辅助软件 ia...
透视教程!wepoker透视脚... 透视教程!wepoker透视脚本下载(透视)真是是有挂(详细辅助AA德州教程)1、下载好wepoke...
今日公布!wepoker透视底... 今日公布!wepoker透视底牌,wepoker免费辅助器,分享教程(有挂神器)这是由厦门游乐互动科...
透视存在!wepoker有透视... 透视存在!wepoker有透视功能吗(透视)本来真的有挂(详细辅助详细教程)一、AI软件牌型概率发牌...
发现玩家!德普之星辅助工具如何... 您好,德普之星辅助工具如何设置这款游戏可以开挂的,确实是有挂的,需要了解加微【136704302】很...
透视存在!拱趴大菠萝怎么开挂(... 透视存在!拱趴大菠萝怎么开挂(透视)一直存在有挂(详细辅助扑克教程)1、完成的残局,帮助玩家取得所有...
发现玩家!wepoker免费透... 1、发现玩家!wepoker免费透视,pokermaster脚本,科技教程(有挂透视)。2、wepo...
辅助透视!约局吧怎么看有没有挂... 辅助透视!约局吧怎么看有没有挂(透视)好像真的有挂(详细辅助透牌教程);1、上手简单,内置详细流程视...
热点讨论!hhpoker辅助挂... 自定义红龙poker辅助平台系统规律,只需要输入自己想要的开挂功能,一键便可以生成出微扑克专用辅助器...
透视最新!sohoo辅助(透视... 透视最新!sohoo辅助(透视)确实真的是有挂(详细辅助插件教程)1、玩家可以在软件透明挂俱乐部对游...