Welcome Serena Central users! CLICK HERE
The migration of the Serena Central community is currently underway. Be sure to read THIS MESSAGE to get your new login set up to access your account.
Highlighted
Edno Absent Member.
Absent Member.
519 views

ALM 11 - TreeManager.getNodeByPath return incorrect node

Hi,

 

I'm using TreeManager.getNodeByPath for verifying if a node path exists, if not I browse recursively the path up to find the node from where I need to recreate the missing subfolders.

 

Function GetParentNodeID(strFullPath) as Long
'''' ..some code before.. '''' On Error Resume Next Set objFolder = objTreeManager.NodeByPath(strFullPath) If Err.Number And Not Err.Number = ALM_ERROR_TEST_NODE_NOTFOUND Then Err.Raise Err.Number, Err.Source, Err.Description If objFolder Is Nothing Then nLen = Len(strFullPath) nPos = InStrRev(strFullPath, "\") strPath = Left(strFullPath, nPos - 1) strFolder = Right(strFullPath, nLen - nPos) nNodeId = GetParentNodeID(strPath) Set objFolder = objTreeManager.NodeById(nNodeId).AddNode(strFolder) End If GetParentNodeID = objFolder.NodeID End Function

In the Test Plan, I have the following folder structure:

Subject
--->0-LEGACY
------>Product2015_04_JUNE_19
--------->SAN
------------>TT012345-PR0001-International Access ZYX
--------------->Change Scenario
------------------>Case01-Access creation using Wapz
--------------------->Sub Case 01 - Business User REP
------------------------>Client 01 - External Client
--------------------------->Components

If I'm using getNodePath with the path "Subject\Product2015_04_JUNE_19\SAN\TT012345-PR0001-International Access ZYX\Change Scenario\Case01-Access creation using Wapz\Sub Case 01 - Business User REP\Client 01 - External Client\Components" (the top folder 0-LEGACY is omitted), the function returns the existing node "Components" from the structure above when I'm expecting an error "Node not found".

 

As an alternative, I also tried to use the function GetSubjectNodeByPath provided in the documentation but I face the same issue.

 

Any idea how to solve this issue?

0 Likes
1 Reply
Micro Focus Contributor
Micro Focus Contributor

Re: ALM 11 - TreeManager.getNodeByPath return incorrect node

There is a defect in the get_NodeByPath detected in Patch 12 for ALM 11.0 . However R&D has not scheduled a fix for it yet. You may wish to log a case with HP Support and enquire about a fix for defect with public ID QCCR1J72394 .

HP QC Support Engineer
If you find that this or any post resolves your issue, please be sure to mark it as an accepted solution
0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.