QC OTA : How to get TestLab Path from a Test Object [VBScript] (2046 Views)
Reply
Occasional Advisor
Sidharthan_PV
Posts: 13
Registered: ‎09-27-2012
Message 1 of 6 (2,046 Views)

QC OTA : How to get TestLab Path from a Test Object [VBScript]

Hi Team,

 

Im working on exporting defect details from QC using OTA in VBScript.

 

I traversed from tdc to Test object. Now I need a way to extract the full path of the test in test lab.

 

Im using QC 11.0

 

Thanks in advance.

Honored Contributor
Trudy Claspill
Posts: 3,778
Registered: ‎09-09-2010
Message 2 of 6 (2,042 Views)

Re: QC OTA : How to get TestLab Path from a Test Object [VBScript]

The Test object is the test case in the Test Plan module. The instances of tests in the Test Lab module are TSTest objects. In order to get the path in the Test Lab for Test Instances that correspond to your Test Plan Test Case, you must first get the Test Instances (TSTest objects) that correspond to that Test Case.

The ID of the Test Plan Test object is contained in each instance of that test in the Test Lab in the TSTest object's property TestId. Look at using a Filter to retrieve the TSTest objects that correspond to your Test object.

Once you have the TSTest object, then you can trace backwards to get the Test Set (TestSet object) that contains that test instance. From the TestSet object you can get the TestSetFolder object, whic is the folder in the Test Lab that contains the Test Set. Once you have the TestSetFolder object, you can get the full path to that folder by looking at the object's Path property.
[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.)
Occasional Advisor
Sidharthan_PV
Posts: 13
Registered: ‎09-27-2012
Message 3 of 6 (2,023 Views)

Re: QC OTA : How to get TestLab Path from a Test Object [VBScript]

Thanks for your Quick Reply.

 

I got the TSTest object now. But Im not able to extract the Test lab Path.

 

It would be grateful if you can share the code [ from the TSTest Object to extracting the Testlab Path ]

 

Thank you

Honored Contributor
Trudy Claspill
Posts: 3,778
Registered: ‎09-09-2010
Message 4 of 6 (2,018 Views)

Re: QC OTA : How to get TestLab Path from a Test Object [VBScript]

As I said, trace backward. All the information is available in the API documentation.

If you have the TSTest object refer to its TestSet Property to get a pointer to the test set (TestSet object) that contains the test instance.

When you have the TestSet object you can look at its TestSetFolder Property to get a pointer to the folder in the lab (TestSetFolder object) that contains the Test Set.

Once you have the TestSetFolder object, review the available properties for the object to figure out how to build the path to that folder.
[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.)
Occasional Advisor
Sidharthan_PV
Posts: 13
Registered: ‎09-27-2012
Message 5 of 6 (1,990 Views)

Re: QC OTA : How to get TestLab Path from a Test Object [VBScript]

[ Edited ]

I tried this: [ TsTest is the TSTest Object ]

 

<code>

 

for each TestSet1 in TsTest.TestSet.NewList("")

   for each Folder1 in TestSet1.TestSetFolder.NewList("")
     
          Path1=Folder1.Path()

 

</code>

 

But its not getting any values.

 

As Im not familiar with OTA, requesting you to provide atleast the first step.

 

from TSTest Object  ->  TestSet Object

 

Thanks

 

Advisor
rajammu
Posts: 21
Registered: ‎06-01-2013
Message 6 of 6 (1,602 Views)

Re: QC OTA : How to get TestLab Path from a Test Object [VBScript]

pls some one help me here :

 

i am trying to access my BPT testplans from testlab but somewhat i am unable to get. pls help if there is way to get my testplans form testlab directly. i know the way how to get testplan but not from testlab.

 

hi guys pls help soon

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.