12-03-2013, 09:24 PM
Hi,
There is an issue with the "Test run scheduler" that we are currently facing.
Any help is really appreciated
Details about the issue:
We are using a VBS file to initiate QTP scripts execution.
The issue we are facing is the scheduler lists junk script names in the list every time we start a fresh execution.
Since we are dealing with scripts count of more than 100 every time the list in the scheduler grows in number due to listing of junk scripts that we executed in previous execution. Due to this QTP eventually crashes.
We are trying to find a way we could clear the scheduler list before every fresh execution. But for the TSScheduler object there seems to be no methods available to do this. So please let me know if you are aware of any ways to clearing the scheduler list.
The script used is similar to the one mentioned below:
Thanks,
Arun S
There is an issue with the "Test run scheduler" that we are currently facing.
Any help is really appreciated
Details about the issue:
We are using a VBS file to initiate QTP scripts execution.
The issue we are facing is the scheduler lists junk script names in the list every time we start a fresh execution.
Since we are dealing with scripts count of more than 100 every time the list in the scheduler grows in number due to listing of junk scripts that we executed in previous execution. Due to this QTP eventually crashes.
We are trying to find a way we could clear the scheduler list before every fresh execution. But for the TSScheduler object there seems to be no methods available to do this. So please let me know if you are aware of any ways to clearing the scheduler list.
The script used is similar to the one mentioned below:
Code:
set tdc = createobject("TDApiOle80.TDConnection")
tdc.InitConnectionEx "http://qcURL/qcbin/"
tdc.login "yourUserName","yourPassword"
tdc.Connect "yourDomain","yourProject"
Set objShell = CreateObject("WScript.Shell")
Set TSetFact = tdc.TestSetFactory
Set tsTreeMgr = tdc.TestSetTreeManager
Set tsFolder = tsTreeMgr.NodeByPath("Root\Formal Tests\YourTestDirectory")
Set tsList = tsFolder.FindTestSets("Your TestSet name. This is case sensitive!")
Set theTestSet = tsList.Item(1)
Set Scheduler = theTestSet.StartExecution("")
Scheduler.RunAllLocally = True
Scheduler.run
Set execStatus = Scheduler.ExecutionStatus
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
Thanks,
Arun S