Test Set Run automatically - Printable Version +- Micro Focus QTP (UFT) Forums (https://www.learnqtp.com/forums) +-- Forum: Micro Focus UFT (earlier known as QTP) (https://www.learnqtp.com/forums/Forum-Micro-Focus-UFT-earlier-known-as-QTP) +--- Forum: VB Scripting/Descriptive Programming (https://www.learnqtp.com/forums/Forum-VB-Scripting-Descriptive-Programming) +--- Thread: Test Set Run automatically (/Thread-Test-Set-Run-automatically) |
Test Set Run automatically - Santhosh311 - 04-14-2016 Hi Guys, Need your help to run my all tests which are present in a particular test set in HPQC (12.0) using VB script. I am using below code. I am not getting any error but the tests in QC are not changing their status from "No Run". set tdc = createobject("TDApiOle80.TDConnection") tdc.InitConnectionEx "https://almbt12.saas.hp.com/qcbin" tdc.login "My_UserName","My_Password" tdc.Connect "Domain","Project" Set objShell = CreateObject("WScript.Shell") Set TSetFact = tdc.TestSetFactory Set tsTreeMgr = tdc.TestSetTreeManager Set tsFolder = tsTreeMgr.NodeByPath("Root\") Set tsList = tsFolder.FindTestSets("") Set theTestSet = tsList.Item(2) Set Scheduler = theTestSet.StartExecution("") Scheduler.RunAllLocally = True Scheduler.run Set execStatus = Scheduler.ExecutionStatus msgbox "1" Do While RunFinished = False execStatus.RefreshExecStatusInfo "all", True RunFinished = execStatus.Finished Set EventsList = execStatus.EventsList For Each ExecEventInfoObj in EventsList strNowEvent = ExecEventInfoObj.EventType Next For i= 1 to execstatus.count Set TestExecStatusobj =execstatus.Item(i) intTestid = TestExecStatusobj.TestInstance Next Loop tdc.Disconnect tdc.Logout tdc.ReleaseConnection Thanks in Advance Santhosh |