Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Test Set Run automatically
#1
Not Solved
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
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  How to run multiple iterations only on a set of lines in script amit25007 0 2,453 05-17-2016, 10:48 AM
Last Post: amit25007
Rolleyes The test run cannot continue due to an unrecoverable error neerndg123 3 8,666 09-17-2015, 08:27 PM
Last Post: ananthakumarbe
  how to add test to test set using vb script ? dasappa 4 17,191 08-15-2012, 09:59 PM
Last Post: sunnystrikes
  How to add objects to repository if QTP is not generating scripts automatically iamsekhar 2 4,022 07-28-2010, 08:27 AM
Last Post: basanth27
  QTP is not generating scripts automatically while recording for wpfMenu items iamsekhar 5 11,661 07-01-2010, 09:11 AM
Last Post: basanth27

Forum Jump:


Users browsing this thread: 1 Guest(s)