首页 > 解决方案 > 使用 OTA 在 ALM 中删除测试集

问题描述

因此,我正在慢慢地努力使痛苦的手动过程在 ALM 中使用 OTA 自动化。我目前的斗争是删除一个测试集。它只是没有做任何事情——没有错误,没有删除,什么都没有。这就像代码行甚至不存在。虽然,它肯定在做一些事情,因为 ALM 现在工作很时髦。

我尝试了不同的方法:Delete、RemoveNode。任何建议表示赞赏。

Set qcConnection = QCutil.QCConnection
Set tsFolder = qcconnection.TestSetTreeManager.NodeById(224)
Set tstestList = tsFolder.FindTestSets("", False, "")

    If tstestList is Nothing Then
        print "No manual tests present", vbOK
    Else

        For i = 1 to tstestList.Count
            Set temp = tstestList.Item(i) 
            if temp.TestSetFolder.father.name = strMonth then
                qcconnection.TSTestFactory.RemoveItem(temp.id)
            end if
        Next
    End If

标签: hp-uftalm

解决方案


看来您使用了错误的工厂-您需要使用TestSetFactory而不是TSTestFactory


推荐阅读