Re: How to get fullpath for Testset (133 Views)
Occasional Contributor
Posts: 4
Registered: ‎05-07-2013
Message 1 of 2 (144 Views)

How to get fullpath for Testset



I have one testset "TestSet1" at path "Root\Application1\Project1\Module1". But I want to search testset in the folder "Root\Application1\Project1" by createing instance of TestSetFolder. And using TestSetFolder.FindTestSets("Root\Application1\Project1") , I am able to get TestSet1 . But, I want Fullpath for TestSet1 though I am using testsetfolder whose path is "Root\Application1\Project1" , actual path of TestSet1 is "Root\Application1\Project1\Module1" which i want.


tsFolder = tsTreeMgr.NodeByPath(nPath)  --- I have already created instance tsTreeMgr of TestSetTreeManager

TestSetsList = tsFolder.FindTestSets("TestSet1") --- TestSsetList is instance of List Array


Could anyone tell me how to get full path of testset or any method which provide full path of TestSet ?


Thanks in advance

Honored Contributor
Posts: 4,329
Registered: ‎09-09-2010
Message 2 of 2 (133 Views)

Re: How to get fullpath for Testset

With TestSetsList you have a list of TestSet objects.


TestSet objects have a property called TestSetFolder, which is a pointer to the TestSetFolder object in which the test set exists.


TestSetFolder objects have properties named




If you get the TestSetFolder property for the TestSet, and then get the Path and Name properties from the TestSetFolder object, you will have the full path to the TestSet.


tsFolder = tsTreeMgr.NodeByPath(nPath)  

TestSetsList = tsFolder.FindTestSets("TestSet1") 

For each TestSet in TestSetsList
  set TestSetFolder = TestSet.TestSetFolder
  TestSetFolderName = TestSetFolder.Name
  TestSetFolderPath = TestSetFolder.Path
  FullPath = TestSetFolderPath & "\" & TestSetFolderName & "\" & TestSet.Name




[If this post solves or helps solve your issue, mark the thread as solved and give KUDOS to the author for their assistance.]

(Opinions expressed in my postings are mine alone, and do not reflect the opinions of my employer.No warranties express or implied for any solution/suggestion posted.)
The opinions expressed above are the personal opinions of the authors, not of HP. By using this site, you accept the Terms of Use and Rules of Participation.