Hi Experts,

I'm a newbie out here trying to write VB code to kickoff a testset on TestDirector 8.0 using TDAPIOLELib.

I could write the following code which fails at last step "scheduler.run". It throws an error saying

Run-time error -2147417848(8001018)
Method 'Run' of object 'ITSScheduler' failed

I tried
"scheduler.run ("c:\\automation\\QTP\\testenvdata.txt")" and
"scheduler.run ("c:\automation\QTP\testenvdata.txt")"
the error was

Run-time error '-2147217900 (80040e14)';
Failed to get execution test data

Please help.

Dim TDConn As New TDAPIOLELib.TDConnection
TDConn.InitConnectionEx ("<tdserver.extension>")
Call TDConn.ConnectProjectEx("<Domain Name>", "<Project>", "<Username>", "<Password>")
Set SetFlt = TDConn.TestSetFactory.Filter
SetFlt.Filter("CY_FOLDER_ID") = "^<PATH>^"
For Each TSet In SetFlt.NewList
If (TSet.Name Like "<Required Testsetname>") Then
Set Scheduler = TSet.StartExecution("<HOSTNAME of QTP machine>")
Scheduler.RunAllLocally = False
Scheduler.TdHostName = "<HOSTNAME of QTP machine>"
End If

I am able to do "msgbox TSet.Name" whcih displays the test set name fine.
If i do "Set Scheduler = TSet.StartExecution("<HOSTNAME of QTP machine>")" with a machine name which is invalid, i get valid error message.

This shows m doing something wrong @ "scheduler.run"

<font color="black"> </font> <font color="blue"> </font> <font color="black"> </font>