I have this script which after initial setup runs a batch of 50 QTP tests. I close QTP and launch it again after 15 tests. It usually works fine. But today, during the run session quite a few tests were failing.
And when QTP quits after 30 tests, it does'nt seem to be back up again and run the next set of 15 tests.
Please help me in improving this.

Below is the code snippet. <font class="small">Code:</font><hr /><pre> For i = 0 to Ubound(testArray)
If (i Mod 15 = 0) Then
If (qtApp.GetStatus &lt;&gt; "Not launched") Then
WriteLogLine("QuickTest is launched. Closing QuickTest Professional")
End If
'Wait 5 seconds for the QuickTest Professional processes to end
Wscript.sleep 5000
'Bring up QTP again
WriteLogLine("Launching QuickTest Professional")
qtApp.Launch ' Start QuickTest
qtApp.Visible = True ' Make it visible
qtApp.Options.Run.ImageCaptureForTestResults = "OnError"
qtApp.Options.Run.RunMode = "Fast"
</pre><hr />