我正在尝试根据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);