2013-03-06 103 views

回答

0

執行以下命令,其中tfsUri是集合的位置,tfsProjectName是該項目的名稱:

var tfsTeamProjectCollection = TfsTeamProjectCollectionFactory.GetTeamProjectCollection(tfsUri); 
var tfsTestManagementService = tfsTeamProjectCollection.GetService<ITestManagementService>(); 
var tfsTestManagementTeamProject = tfsTestManagementService.GetTeamProject(tfsProjectName); 
var tfsTestPlans = tfsTestManagementTeamProject.TestPlans.Query("SELECT * FROM TestPlan"); 
foreach (var tfsTestPlan in tfsTestPlans) 
{ 
    tfsTestPlan.Delete(DeleteAction.ForceDeletion); 
} 
+0

謝謝你,你讓我很快樂。 – StefanHa 2013-03-29 11:55:58