| || |
Issue with "Test run scheduler"
There is an issue with the "Test run scheduler" that we are currently facing.
Any help from you is really appreciated
Details about the issue:
We are using a VBS file to initiate QTP scripts execution.
Based on the script names we have listed in an excel file the VB file, using OTA concepts executes tests by using the scheduler.
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 test run scheduler grows in number due to listing of junk scripts that we executed in previous execution. Due to the test run eventually crashes.
I was 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.(The methods available for TSScheduler Object arr "Run" and "Stop")
So please let me know if you are aware of any ways to clearing the scheduler list.
The script is similar to the one mentioned below:
set tdc = createobject("TDApiOle80.TDConnection")
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
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
For i= 1 to execstatus.count
Set TestExecStatusobj =execstatus.Item(i)
intTestid = TestExecStatusobj.TestInstance