I have set the Run settings to "Proceed to next action iteration"
But if the test fails for some reason is it possible to stop test from within the script.
If you want to stop the test Whenever it failed, why are you choosing the Run option as "Proceed to next action iteration"?
Choose Stop the Test Run from option. And if you logic in the code to do it then use ExitTest, ExitRun etc...
Tarun Buy the NEW QTP Descriptive Programming Unplugged Book ** Download QTP Unplugged 2nd Edition eBook for FREE **
You can use the following:
exitaction : to stop the current action and proceed with the next row of the test
exittest : to stop the test compleet
Best of All use DVS and DVS4SBC for a better world and a minimum of Stress.
public function stopqtp()
Set obj = CreateObject("Mercury.DeviceReplay")
Set qtApp = CreateObject("QuickTest.Application")
qtApp.Visible = True
Call this function to stop QTP