Forum Discussion

Capricornus's avatar
Capricornus
Contributor
4 years ago
Solved

ignore specific error

Hello everyone,

in my tests I often get the error "the dllhost.exe process crashed". When I disable the stop on error function the test continues without any further problems.

Is it possible to ignore this specific error, so that it won't be logged as an error anymore and my tests pass instead of fail?

 

Many thanks in advance 🙂

  • Whether or not it affects the GUI tests, it's an error that the application is generating that should probably be reported to the developers for investigation.

     

    To answer your question, though... the only thing you can do to trap that error is to create an "OnLogError" event handler and, within it, add logic so that if the text of the error matches the one you want to suppress, then disable that log entry.  

     

    But, as noted, from a QA/Testing perspective, I'm not sure that's wise because then you're masking a potential problem and not reporting on it.  YMMV but I think it's better to keep the error being logged and work with your developers to come up with a solution.

8 Replies

  • tristaanogre's avatar
    tristaanogre
    Esteemed Contributor

    Why would you want to avoid an error?  It seems to me that this is some sort of problem with your application that is being reported by your automated tests... which is what they are there for.  Have you investigated what is causing the problem?

    • Capricornus's avatar
      Capricornus
      Contributor

      I can not reproduce the error, it appears sporadically in different steps and not always at the same process.

      And except the error log it does not affect the GUI tests that I use.

      • tristaanogre's avatar
        tristaanogre
        Esteemed Contributor

        Whether or not it affects the GUI tests, it's an error that the application is generating that should probably be reported to the developers for investigation.

         

        To answer your question, though... the only thing you can do to trap that error is to create an "OnLogError" event handler and, within it, add logic so that if the text of the error matches the one you want to suppress, then disable that log entry.  

         

        But, as noted, from a QA/Testing perspective, I'm not sure that's wise because then you're masking a potential problem and not reporting on it.  YMMV but I think it's better to keep the error being logged and work with your developers to come up with a solution.