1
在Quality Center OTA API中,如何從測試中刪除步驟。當我使用DesignStepFactory的RemoveItem方法刪除步驟,他們仍然 - 我已經試過雙方ID和步驟參考刪除:如何通過OTA API從質量中心的測試中刪除步驟
Test test = _qcAccess.AddTest(folderId);
test.Name = "Test 1";
test.Post();
DesignStepFactory factory = (DesignStepFactory) test.DesignStepFactory;
DesignStep step = (DesignStep)factory.AddItem(1);
step.StepName = "Step1";
step.Post();
Test test2 = _qcAccess.FindExistingTest((int)test.ID);
DesignStepFactory factory2 = (DesignStepFactory) test2.DesignStepFactory;
Assert.Equal(1, test2.DesStepsNum);
factory2.RemoveItem(factory2[0]);
test2.Post();
Test test3= _qcAccess.FindExistingTest((int)test.ID);
Assert.Equal(0, test3.DesStepsNum); // test fails here, DesStepsNumb is still 1
按照OTA API文檔
RemoveItem方法
描述:從 數據庫中刪除項目。立即刪除 ,沒有帖子。
語法:
公用Sub的removeItem(BYVAL的ItemKey作爲變型)
的ItemKey:
的Step.ID(長),到 步驟對象或參考 Step.IDs.Step.IDs的變體數組。
所以它看起來應該工作。僅供參考,用於QC10。
有什麼想法?