/// <summary> /// Removes a single test from test set /// <para/>returns true if successfull /// </summary> /// <param name="testSet">TDAPIOLELib.TestSet Object</param> /// <param name="tSTest">TDAPIOLELib.TSTest Object</param> /// <returns></returns> public Boolean RemoveTest(TDAPIOLELib.TestSet testSet, TDAPIOLELib.TSTest tSTest) { TDAPIOLELib.TSTestFactory tSTestFactory = testSet.TSTestFactory; tSTestFactory.RemoveItem(tSTest.ID); testSet.Post(); return(true); }
/// <summary> /// Removes all tests from testset /// <para/>returns true if successfull /// </summary> /// <param name="testSet">TDAPIOLELib.TestSet Object</param> /// <returns>true if successfull</returns> public Boolean RemoveAllTests(TDAPIOLELib.TestSet testSet) { TDAPIOLELib.List list = testSet.TSTestFactory.NewList(""); foreach (TDAPIOLELib.TSTest tSTest in list) { testSet.TSTestFactory.RemoveItem(tSTest.ID); testSet.Post(); } return(true); }
/// <summary> /// Create a new test set in the test plan /// <para/> returns TDAPIOLELib.TestSet object /// </summary> /// <param name="testSetDetails">Test set database fields with values</param> /// <param name="testSetFolderPath">Test lab Folder path for test set</param> /// <returns></returns> public TDAPIOLELib.TestSet Create(Dictionary <String, String> testSetDetails, String testSetFolderPath) { TDAPIOLELib.TestSetFactory testSetFactory = testLabFolders.GetTestSetFolder(testSetFolderPath).TestSetFactory; TDAPIOLELib.TestSet testSet = testSetFactory.AddItem(System.DBNull.Value); foreach (KeyValuePair <string, string> kvp in testSetDetails) { testSet[kvp.Key.ToUpper()] = kvp.Value; } //Post the test to ALM testSet.Post(); return(testSet); }