Forum Discussion

joel_johnson's avatar
joel_johnson
Occasional Contributor
12 years ago

Using OnLogCheckpoint event handler to log failures as warnings instead of errors

Hi,



I have tried to use the OnLogCheckpoint event handler to make my checkpoints post warnings instead of errors (I don't want them to make my tests stop running like the other failures).  I cannot figure out how to make this work.  I am using Keyword testing, but any advice on how to make this work would be appreciated.

4 Replies

  • joel_johnson's avatar
    joel_johnson
    Occasional Contributor
    I don't have a code snippet because I am using a keyword test to handle the event.  Basically it says,



    If Last Operation Result = False (I am trying to say if the checkpoint failed)

    ->Log Warning (I want it to log a warning instead of an error).

    Else

    ->Log message "checkpoint passed."
  • Hi Joel,



    If you don't want TestComplete to stop when it logs an error, just follow this steps:


    1. Double click on your project (main screen, left sidebar)


    2. Go to 'Properties' tab


    3. Go to 'Playback' panel


    4. Unselect 'Stop on error'


    There are many options you can set there, check them also



    Bye!
  • joel_johnson's avatar
    joel_johnson
    Occasional Contributor
    Thanks Javier, I was aware of this.  But I specifically want to not stop on Checkpoint failures and stop on all other tests.  I don't see an option for this.