Forum Discussion
6 Replies
- shankar_rCommunity Hero
It is better to relaunch the AUT in between tests to eliminate crashing unless there is a requirement to launch only once.
Do you know when it gets a crash? like memory limit, session time, etc.
- rushikeshContributor
: Do you know when it gets a crash? like memory limit, session time, etc.
: Usualy it crashes somewhere around 1 hour after starting the test , there is no particular step though.
I think memory must be one of the reason also.
- AlexKarasChampion Level 3
Hi,
With the crashed tested application, TestComplete should trigger log error because of inaccessibility of some UI control that test code will try to interact with right after the moment of crash.
So, you can create a handler for the OnLogError event and check there whether or not the application crashed and proceed appropriately. The exact check will depend on how application crashes. If its process has gone, then the check may be a simple verification for Sys.WaitProcess('<your tested application>', 500).Exists. If some crash dump window is displayed on crash, you may need to check for this window. And so on.
Note, that if you decide to restart your application from within the OnLogError event handler, than you must set a flag that you already is within the handler and exit from the handler if an error occurs while restarting the application. Otherwise you may appear within endless recurrent loop that will exaust system resources.
The bad news is that TestComplete does not provide any built-in means to restart the failed test item. Thus you must implement your own logic and execute it on start of every test item to determine if the current test item can be executed or not.
- anupamchampatiFrequent ContributorGeneral Event on log :
1. check for the log.testitem name if it is not project. last item by some count as a check
2. Simply write a function to check whether sys.process applicationname exists and if not run the application and run the remaining testitem from project.testitems
Best way would be restart the application on every start of Testcase- AlexKarasChampion Level 3
Hi,
> Best way would be restart the application on every start of Testcase
This is a usual practice for the integration tests but I would say it is highly discussible in the case of complex end-to-end test that check if some task but not an operation with the binary result can be done.
- TanyaYatskovskaSmartBear Alumni (Retired)
Thanks everybody for sharing your suggestions!
rushikesh, did you find a solution?
Related Content
- 8 years ago
Recent Discussions
- 2 days ago