09-06-2011, 05:49 PM
Hi Parminder,
Thanks for your responce.
However I have modified the below code ...Yet the test script is not executable.Please advice.
I am trying to select a test from the list of tests in a test set and trying to execute it ,however i am unable to select a particular test and execute.
Thanks!!!
Thanks for your responce.
However I have modified the below code ...Yet the test script is not executable.Please advice.
I am trying to select a test from the list of tests in a test set and trying to execute it ,however i am unable to select a particular test and execute.
Code:
Dim tdc
Dim runName
Set tdc = CreateObject("TDAPIOLE80.TDConnection")
'###############################################################################################################
tdc.InitConnectionEx "http://qctest:8080/qcbin"
tdc.Login "automation", ""
tdc.Connect "STD", "Project"
If (tdc.connected <> True) Then
MsgBox "qc project failed to connect to " &"Project"
WScript.Quit
End If
Set tfact = tdc.TestSetFactory
Set tsTreeMgr = tdc.TestSetTreeManager
Set tcTreeMgr = tdc.TreeManager
nPath = "Root\" & Trim("Bui\testset")
Set TestSetFolder = tsTreeMgr.NodeByPath(npath)
Set TestSetF = TestSetFolder.TestSetFactory 'Retreive test from given folder in test lab
Set aTestSetArray = TestSetF.NewList("")
tsSet_cnt=aTestSetArray.Count
For i=1 to tsSet_cnt ' Loop through the Test Sets to pick the desired test Set
Set tstests=aTestSetArray.Item(i)
TestSet_Name=tstests.Name
PRINT TestSet_Name
If TestSet_Name= "Creategmailaccount" Then
Set Scheduler = theTestSet.StartExecution("")
Scheduler.RunAllLocally = True
Scheduler.Run
Set execStatus = Scheduler.ExecutionStatus
MSGBOX execStatus
End If
Next
Thanks!!!