4

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

Greg
  • 1,227
  • 5
  • 23
  • 52

3 Answers3

3

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

Zakir Sayed
  • 200
  • 2
  • 12
0

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.

Community
  • 1
  • 1
Helen
  • 87,344
  • 17
  • 243
  • 314
0

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

Sample:-

Log.Error "Any Error message"

Sethi
  • 1