Need a way to extract all the tests under ALM test plan with complete path using VB script?
I am working on a way to extract all the tests including folder paths in HP ALM using VB script, I have got most of the code but missing a small peice where my code misses to find some tests:
Here is my code:
ALMTestList "Subject\Automation\QTP\Scripts" Public Function ALMTestList(ByVal MAINFOLDER) 'Specify Array to contain all nodes of subject tree. Dim objTreeManager, FocusFolder Set TDConnection = QCUtil.TDConnection Set objTreeManager = TDConnection.TreeManager Set FocusFolder = objTreeManager.NodeByPath(MAINFOLDER) For i = 1 To FocusFolder.Count 'If current node has a child then get path on child nodes too. If FocusFolder.Child(i).Count >= 1 Then Dim FocusFolderTemp FocusFolderTemp = ALMTestList(FocusFolder.Child(i).Path) Else Set oTestList = FocusFolder.Child(i).FindTests("") If TypeName(oTestList) <> "Nothing" Then For Each oTest in oTestList Report FocusFolder.Child(i).Path & "\" & oTest.Name Next Else Report "Empty Folder in Test Plan : " & FocusFolder.Child(i).Path End If End If Next ' Cleanup objects Set FocusFolder = Nothing Set objTreeManager = Nothing Set TDConnection = Nothing End Function
Missing Peice of code:
This code will grab all the tests under the Test plan going through all the subfolders and returns the Full Path of the tests, but it misses the tests that are under the childfolders, which have both tests and childfolder(s). Can someone help to fix this borken peice?