0
A
回答
0
你会想要使用Actions属性。这将返回TestActionCollection您可以用来更新步骤。您可以对集合中的每个操作使用ITestStep界面来更新每个步骤的标题,描述和ExpectedResult。不要忘记在工作项目上致电Save()
。
0
测试用例与Bug或Task等正常工作项目不同。您需要使用Microsoft.TeamFoundation.TestManagement.Client中的“ITestManagementService”来更新测试用例。查看以下代码以供参考:
using System;
using Microsoft.TeamFoundation.Client;
using Microsoft.TeamFoundation.TestManagement.Client;
namespace TFSDownloadFile
{
class Program
{
static void Main(string[] args)
{
string url = "http://tfscollectionurl/";
TfsTeamProjectCollection ttpc = new TfsTeamProjectCollection(new Uri(url));
ITestManagementService itms = ttpc.GetService<ITestManagementService>();
ITestManagementTeamProject itmtp = itms.GetTeamProject("YourProject");
//Get test case with test case id
ITestCase itc = itmtp.TestCases.Find(1);
//Get the first step in test case
ITestStep teststep = itc.Actions[0] as ITestStep;
//Update the test step
teststep.Title = "New Title";
teststep.ExpectedResult = "New ExpectedResult";
//Save the updated test case
itc.Save();
}
}
}
相关问题
- 1. TFS预先签入步骤
- 2. 向tfs添加步骤
- 3. 如何更新HealthKit的步骤数?
- 4. TFS 2010定制构建步骤
- 5. 并行运行TFS构建步骤
- 6. BindToRenderStep或心跳更新步骤(ROBLOX)
- 7. 反应状态更新步骤
- 8. 自己建立的RPM中的中间更新步骤
- 9. 步骤CSS更长的话
- 10. 在TFS 2010中更改现有项目的流程模板的步骤
- 11. 动态更改/更新“jQuery步骤”中没有“删除”+“添加”的步骤标题?
- 12. 转储C,Linux中的调试步骤
- 13. 如何在简单的步骤中用SOAP连接到TFS EventService
- 14. 使用ALM API批量更新HP ALM中的运行步骤
- 15. 黄瓜步骤上错误的步骤
- 16. ISampleGrabberFilter一次一个步骤的步骤
- 17. 微软在TFS VS中创建测试步骤
- 18. 索引源和发布符号步骤在TFS 2015中失败
- 19. 在seekbar中更改步骤值?
- 20. TFS 2015年的 “Visual Studio的测试” 的步骤
- 21. 步骤
- 22. 为什么在TFS中构建步骤之后我们需要SonarQube结束分析步骤?
- 23. 从PowerShell的构建步骤访问TFS TeamProjectCollection
- 24. tfs nuget步骤未能获得较旧版本的包
- 25. TFS 2015年 - Visual Studio的生成步骤 - 发布位置
- 26. 如何生成TFS 2010的详细构建步骤报告
- 27. 将TFS 2010迁移到另一个环境的流程步骤
- 28. ASP.net ajax:需要最佳实践 - 更新页面上的步骤
- 29. 我在寻找将游戏更新到SDL 2.0的步骤
- 30. sql server更新来自步骤的双精度舍入