本文介绍了尝试连接到TFS服务器并获取“测试环境”。有人可以指导我的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试连接到TFS服务器并获取"测试环境"。我们在MTM中看到的字段数据。


但没有得到它。



我关注的是下面:



TfsTeamProjectCollection tfctc = new TfsTeamProjectCollection(new Uri(" My URL"));

ITestManagementService testmanagementService = tfctc.GetService< ITestManagementService>();
$
var teamproject = testmanagementService.GetTeamProject(" teamprojectname");

IEnumerable< ITestRun> testruns = testmanagementService.QueryTestRuns(" select * From TestRun where testRunId = 213734");




testruns 
 我几乎全部我需要的详细信息  TotalTests,  IncompleteTests,  PassedTests,State,  Title ..... 


但无法获得"测试环境" ;包含远程机器名称的数据......



有人可以看一次....并帮助我


解决方案

I am Trying to connect to TFS server and get the "Test environment" field data that we see in MTM.

but not getting it.

I am following the below:

TfsTeamProjectCollection tfctc = new TfsTeamProjectCollection(new Uri("My URL"));
ITestManagementService testmanagementService = tfctc.GetService<ITestManagementService>();
var teamproject = testmanagementService.GetTeamProject("teamprojectname");
IEnumerable<ITestRun> testruns = testmanagementService.QueryTestRuns("select * From TestRun where TestRunId = 213734");

in the testruns  i got almost all the details that i need like TotalTests, IncompleteTests, PassedTests, State, Title ..... 

but not able to get the "Test environment" data which contains the remote machine name ......

can some one look into it once.... and help me out

解决方案


这篇关于尝试连接到TFS服务器并获取“测试环境”。有人可以指导我的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-29 03:28