Actually I think it is better that this be moved to the QC forum.
Original poster: I believe you work with the QC object automation model to initiate test set execution, rather than trying to "reach down into" QTP's object automation model to execute each test. Could be wrong on this, but I suggest you start by asking "how do I..." with QC. And, have you referred to the QC documentation and/or online help with this question? Given is basic nature I would be surprised if your answer is not waiting for you there.
I am currently working on the same piece of functionality.
It is necessary to invoke my scripts through the command
line to integrate with another product.
First Strategy: <ul type="square">[*]Invoke QTP from a vbs script [*]QTP is setup to autoconnect to QC[/list]Drawbacks:
1. Since the scripts are not run through QC AutoRunner no
e-mail is generated to notify of script failure
2. The scripts are not run as a test set so maintenance of your vbs script will be necessary
3. I have QC... why not use it.
Second Strategy:<ul type="square">[*]Use OTA to connect directly to QC.[*]Run the test set as shown in the "Running the test instances locally, remotely, or as planned" example
in the OTA Com Library[/list]
PROBLEM: The test set is invoked directly not through
the QC AutoRunner so still no automatic
email upon failure takes place.
I can always use the status from TestExecStatus to make
my own e-mail, but the QC e-mail looks to professional to pass up.