No Log.ErrCount when test is being stopped manually
I've opened a support issue and but they couldnt help me on this so im hoping maybe someone here knows the solution to following problem.
At the end of each of my tests the general event OnStopTest is being called and writes some results and performance data into a sql database.
Writing into database should only happen when the test has passed without error. To check if the testrun is failed in addition to OnLogError Event i check for Log.ErrCount inside OnStopTest function.
The only problem i cant solve is: When i manually stop the testrun following happens:
1. Test is stopped
2. OnStopTest event is being called -> Log.ErrCount is 0 (but should be > 0 || 1)
At this point -> The Test is failed but Log.ErrCount is 0 and my function writes wrong results into database
3. Error "The script execution was interrupted" is Logged after the OnStopTest Event finished (i assume that only at this point Log.ErrCount is being increased by 1)
I was thinking about the OnStopTest Event (Manual Testing Events) but i dont know if this is even usable also its marked as deprecated and it'll be removed in the future so i didnt try.
Is there a way to solve this?
Thanks in advance