Reputation: 1377
I am trying to programmatically fail a test in TestComplete What code do I have to write to set a vb script test as failed in TestComplete? Thank you
Upvotes: 4
Views: 2229
Reputation: 1
Log.Error statements throws an error programmatically and fails the test.
Sample:-
Log.Error "Any Error message"
Upvotes: 0
Reputation: 200
Try Log.Error("Some error message") and change the Project properties to stop test on error.
Upvotes: 3
Reputation: 97962
Something like Runner.Halt
maybe?
The
Halt
method stops the script execution and posts an error string specified byErrorMsg
to the test log.The method stops the entire test run, that is, for instance, if you are executing a project or project suite test, the method will stop the entire project or project suite run.
Upvotes: 0