0

我正在尝试通过 TFS API 删除特定的测试套件,现在已经成功。

IStaticTestSuite suite = suite_entry.TestSuite as IStaticTestSuite;
if (suite != null)
{
   IStaticTestSuite newSuite = destinationSuite.Project.TestSuites.CreateStatic();
   newSuite.Title = suite.Title;
   destinationSuite.Entries.Add(newSuite);
   CopyTestCases(suite, newSuite);
   Console.WriteLine("copy Suite ID ({0}) to Id ({1})", suite.Id, newSuite.Id);
   if (suite.SubSuites.Count > 0)
      CopyPlanSuites(suite.Entries, newSuite);
   if (newSuite.Entries.Count == 0)
      newSuite.Parent.SubSuites.Remove(newSuite);
}

在最后一行我试图删除空套房

4

1 回答 1

0

发现错误已修复

destinationSuite.Entries.Remove(newSuite);
于 2013-07-14T12:41:42.157 回答