09-06-2011, 04:35 PM
(This post was last modified: 09-06-2011, 04:37 PM by parminderdhiman84.)
Hi,
Please find the code below to find the required test set:
Regards,
Parminder
Please find the code below to find the required test set:
Code:
Dim tdc
Dim runName
Set tdc = CreateObject("tdapiole80.tdconnection")
tdc.InitConnectionEx QCServer
tdc.Login UserName, Password
tdc.Connect DomainName, ProjectName
If (tdc.connected <> True) Then
MsgBox "qc project failed to connect to " & ProjectName
WScript.Quit
End If
Set tfact = tdc.TestSetFactory
Set tsTreeMgr = tdc.TestSetTreeManager
Set tcTreeMgr = tdc.TreeManager
Set TestSetFolder = tsTreeMgr.NodeByPath(<Test_Set_Folder_Path_QC>)
Set TestSetF = TestSetFolder.TestSetFactory 'Retreive test from given folder in test lab
Set aTestSetArray = TestSetF.NewList("")
tsSet_cnt=aTestSetArray.Count
For p=1 to tsSet_cnt ' Loop through the Test Sets to pick the desired test Set
Set tstests=aTestSetArray.Item(p)
TestSet_Name=tstests.Name
If TestSet_Name=<Test_Set_Name_QC> Then
<do your next step here>
End If
Next
Regards,
Parminder