Forum Discussion
Is it necessary to stop the automation manually? What is the reason to stop the automation manually?
I'm just trying to understand, as there could be alternative ways or resolving what you are trying to do.
- DanNad2 years agoContributor
Inside of GeneralEvents_OnStopTest we are collecting performance data (test-duration, cpu usage of AUT, memory usage of AUT etc.) and log the data into our database. But this data should only be written into the database if the test is passed.
To determine if the test is passed or failed we defined a variable "ErrorStatus". This ErrorStatus variable will be set to 1 (for failed) if: GeneralEvents_OnLogError has been called or if Log.ErrCount is greater than 0
So we need to have the test marked as failed when:
1. Log.Error(...) occured --> GeneralEvents_OnLogError(...) was called
2. JScript runtime exception occured -> Log.ErrCount is raised by 1 but does not call GeneralEvents_OnLogError(...)
3. The test was stopped by user -> does not raise Log.ErrCount and test is marked as "Passed" inside of GeneralEvents_OnStopTest(...) -> Only problem left for me to solve
We use the performance data to calculate a percentage deviation to previous test runs (test-duration, cpu usage, memory usage) and in order to ensure that the performance data comes only from test runs that are initailly "passed" we have to prevent that data from a failed test is being written into our database.And of course we do stop the tests every now and then especially if we have to debug and fix our test scripts.
Related Content
- 3 years ago
- 9 months ago
- 4 years ago
Recent Discussions
- 12 hours ago