【问题标题】:TFS - linking Run ID to Test ID?TFS - 将运行 ID 链接到测试 ID?
【发布时间】:2017-02-17 12:32:31
【问题描述】:

TFS 网络: 我分配了所有测试人员来测试特定的套件/测试用例。

我正在寻找一种可能性来创建统计/查询以将运行 ID 与其测试用例 ID 相关联。

这可能吗?

【问题讨论】:

    标签: tfs testcase usage-statistics


    【解决方案1】:

    没有这样的查询将运行 ID 与其测试用例 ID 相关联,但您可以通过 API 实现。

    下面是一个从测试用例ID中获取第一个测试运行ID的例子,你可以参考一下:

    TfsTeamProjectCollection tfsCollection = new TfsTeamProjectCollection(new Uri("http://tfsserver:8080/tfs/teamProjectCollection"));
    ITestManagementService tms = tfsCollection.GetService<ITestManagementService>();
    ITestManagementTeamProject teamProject = tms.GetTeamProject("teamproject");
    var lastResult = teamProject.TestResults.ByTestId(tc.Id).OrderByDescending(tr => tr.DateStarted).FirstOrDefault();
    var run= lastResult.GetTestRun();
    Console.WriteLine(run.Id);
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2017-05-16
      • 1970-01-01
      • 2015-02-07
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多