Forum Discussion

autoguy1's avatar
autoguy1
Occasional Contributor
4 years ago

Prevent logging an error when a process crashes.

So my application actually has a bug that is not going to get fixed. There is a scenario where a certain process will crash and restart. I am not using this process in my test and do not care about it. However, TestComplete is logging an error when this process crashes and since it is irrelevant to my test I would like to avoid this from happening.

 

The error I am getting is :  The (ProcessName).exe process crashed.

 

Is there a way I can tell TestComplete to ignore this particular error or process? 

  • I checked with support and there is no reasonable way to make this work currently using event handlers. They suggested a way the error could be completely disabled by deleting some files in the install directory, but that really doesn't resolve the issue since I only need to suppress it temporarily.  My workaround ended up being to disable the Log itself when executing the small portion of code that would sometimes cause this error to appear when there didn't appear to be an actual crash, then re-enable the log after.

     

    I logged request to make the OnLogError event handler work correctly in this case: https://community.smartbear.com/t5/TestComplete-Feature-Requests/OnLogError-event-handler-should-handle-Process-Crashed-message/idi-p/233461#M2600

     

  • Go in Current Project Properties and try this (Chrome.exe is my example here - use Add Process to put your own in the list)

     

     

    • autoguy1's avatar
      autoguy1
      Occasional Contributor

      I did try this and I am still getting messages that this process crashed.  I would like to add that I don't want to ignore this process throughout my project. It is a part of the application I use in other tests. There is just an edge case that causes it to crash and I want to ignore the fact that it crashes since it will autorestart anyway. 

  • AlexKaras's avatar
    AlexKaras
    Champion Level 3

    Hi,

     

    Consider to use OnLogError event handler and block this error from been posted to test log.

     

    • autoguy1's avatar
      autoguy1
      Occasional Contributor

      The OnLogError Event documentation specifically states it is not raised on a "The .... process crashed" error. 

      I did find a post from a couple of years ago with someone having a similar issue but there was no resolution. I guess currently I will just put a log to check if this is the only failure. This test may get removed eventually if we get network suite working. I was just curious if there was a fix in the meantime. It is looking like maybe there isn't. 

      • AlexKaras's avatar
        AlexKaras
        Champion Level 3

        Hi,

         

        The OnLogError Event documentation specifically states it is not raised on a "The .... process crashed" error. 

        Thank you for this note.

        (One more reminder that it is a good habit to review TestComplete's documentation to refresh one's (mine;) ) memory.)