daianovich
12 years agoOccasional Contributor
Timer affects Onstart/OnStopTest Events
I am using old TestComplere 7.52 to test Qt4.8 application on Windows 7 x64.
In order to have CPU/Memory usage monitoring I followed this
http://support.smartbear.com/screencasts/testcomplete/memory-leak-testing-video/
But I used Timer for calling monitoring routine.
I also implemented handlers for OnLogError, OnStart/StopTest Events for testing purposes.
Now, when I start Timer with any Interval parameter and run a lot of tests (or a lot of iterations of some TestItem) - 10 for example - I have following problems:
1. OnStart/StopTest Events' handlers are both sometimes called in the start of TestItem and then OnStartTest Event handler is called (it starts an application).
2. Sometimes Handlers after appearing of (1.) stops to be called at all.
3. Rarely corresponding event handlers are deattached from events - error in TC occurs and handling stops.
Is there a way to overcome this behaviour?
I think that the source of problem lies in the following:
Timer is not called every Interval period of time and its calles are stored in some stack and affect event handling. Am I right? I tried various Interval from 500 to 5000 milliseconds. First one works worse than second but every one of them has problem 1.
In order to have CPU/Memory usage monitoring I followed this
http://support.smartbear.com/screencasts/testcomplete/memory-leak-testing-video/
But I used Timer for calling monitoring routine.
I also implemented handlers for OnLogError, OnStart/StopTest Events for testing purposes.
Now, when I start Timer with any Interval parameter and run a lot of tests (or a lot of iterations of some TestItem) - 10 for example - I have following problems:
1. OnStart/StopTest Events' handlers are both sometimes called in the start of TestItem and then OnStartTest Event handler is called (it starts an application).
2. Sometimes Handlers after appearing of (1.) stops to be called at all.
3. Rarely corresponding event handlers are deattached from events - error in TC occurs and handling stops.
Is there a way to overcome this behaviour?
I think that the source of problem lies in the following:
Timer is not called every Interval period of time and its calles are stored in some stack and affect event handling. Am I right? I tried various Interval from 500 to 5000 milliseconds. First one works worse than second but every one of them has problem 1.