Question

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

Was it helpful?

Solution

Try Log.Error("Some error message") and change the Project properties to stop test on error.

OTHER TIPS

Something like Runner.Halt maybe?

The Halt method stops the script execution and posts an error string specified by ErrorMsg 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.

Log.Error statements throws an error programmatically and fails the test.

Sample:-

Log.Error "Any Error message"

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top