VSTS:通过Test Run Id检索TestRun(RunType = Automated)

时间:2017-11-09 09:13:37

标签: azure-devops azure-devops-rest-api

我正在尝试根据Test Run ID(Run Type = Automated)检索TestRun,但它返回null。如果测试运行id为Manual,则返回TestRun对象。是否有任何选项可以根据ID检索自动测试运行?

var tfsCollection = new TfsTeamProjectCollection(new Uri(vstsCollectionUrl), new VssClientCredentials());
tfsCollection.EnsureAuthenticated();

var testMgmtService = tfsCollection.GetService<ITestManagementService>();
var testMgmtTeamProject = testMgmtService.GetTeamProject(vstsProject);

var testRun = testMgmtTeamProject.TestRuns.Find(testRunId);

var testResults = testRun.QueryResultsByStatus(TestResultState.InProgress);

0 个答案:

没有答案