API find test plan folder

Question ID: 106545

I was wondering if it was possible to use the API to find out if a specific Test folder exists in the project.

Marked as spam
Posted by (Questions: 122, Answers: 3)
Asked on December 17, 2015 2:00 pm
Answers (1)
Private answer

You can use the below script to search for a specific folder. This will search recursively through the tree.

Set TreeMgr = TDConnection.TreeManager
Set oRoot = TreeMgr.TreeRoot(''Subject'')
Set folder = oRoot.FindChildNode(''MY_FOLDER'')

If folder Is Nothing Then
MsgBox ''MY_FOLDER does not exist.''
Exit Function
MsgBox ''Found it.''
End If

Set folder = Nothing
Set oRoot = Nothing
Set TreeMgr = Nothing

Marked as spam
Posted by (Questions: 3, Answers: 168)
Answered on December 17, 2015 2:01 pm