Search code examples
hp-uftalm

Delete a TestSet in ALM using OTA


So, I'm SLOWLY working my way to having a painful manual process automated in ALM using OTA. My current struggle is deleting a test set. It just doesn't do anything - no error, no deletion, nothing. It's like the line of code isn't even there. Although, it's definitely doing something cause ALM is working funky now.

I've tried different things: Delete, RemoveNode. Any advice is appreciated.

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

Solution

  • It seems you use a wrong factory - you need to use TestSetFactory instead of TSTestFactory