C# Create Subject Folder and Business Process Test
private ITest BuildTestsTree()
{
  //Create a subject folder and add a new Business Process Test
  TestFactory testF = (TestFactory)tdConnection.TestFactory;
  ITest newTest;

  //Create a test plan subject folder
  TestFolderFactory testFolderF = (TestFolderFactory)tdConnection.TestFolderFactory;
  TDFilter testFolderFFilter = testFolderF.Filter;
  testFolderFFilter["AL_DESCRIPTION"] = "Subject";
  IList testFolderFL = testFolderFFilter.NewList();
  TestFolder rootFolder = (TestFolder)testFolderFL[1];
  TestFolderFactory childFolderFactory = rootFolder.TestFolderFactory;
  TestFolder newFolder = childFolderFactory.AddItem(DBNull.Value);
  newFolder["AL_DESCRIPTION"] = "myTestFolder2";
  newFolder.Post();

  //Get a test factory from the new folder
  testF = (TestFactory) newFolder.TestFactory;

  //Create the test
  newTest = (ITest)testF.AddItem(DBNull.Value);
  newTest.Name = "myBPTest1";
  newTest.Type = "BUSINESS-PROCESS";

  //Save the test
  newTest.Post();

  return newTest;
}