Forum Discussion
Correct, there is not a function to do a delta... what you would do is a constant "updating" of the existing TestComplete export using the Log.SaveLogAs method. The effect is still the same: every so many seconds, a timer kicks off and saves the TC log up to that point.
One thing to take a look at... If you have your tests organized as TestItems in the project, there is an option in the SaveLogAs to only save out the log for the current TestItem. What you could do then is add code into your routine that does the save to detect when the project moves on to a new test item... when it does, save a new file.
It's not EXACTLY what you want... but it does effectively what you need to.
- maximojo9 years agoFrequent Contributor
The problem is SaveLogAs will save out the ENTIRE log each time. Some of my automation session logs take over 5 minutes to export after TE is done. Therefore towards the end of my test run each LogSaveAs will end up being minutes (if called by the timer).
Thanks, I will look at the test item option though I suspect, unless Smartbear adds it, I will have to come up with my own custom solution. Shouldn't be too hard. Will report it here when I'm done.
- tristaanogre8 years agoEsteemed Contributor
maximojo wrote:
The problem is SaveLogAs will save out the ENTIRE log each time.
There is an option under your project properties. If you go to Tools -> Current Project Properties -> Playback, at the bottom there is an option to "Save log every ____ minutes". Now, this doesn't do the export but does just a native save of the log file every few minutes. The idea is specifically for what you are looking for: if TestComplete crashes, the environment crashes, etc., you don't lose your log. It's not a delta export to a central location but it does create a log backup for you in the event of an unforeseen circumstance.
- maximojo8 years agoFrequent Contributor
Thanks tristaanogre.
However, if you look at the original question I am looking to monitor the logs at runtime so I can know if error conditions occur. I do know about the "save log every X" time as I was stung by that years ago when TC crashed towards the end of a long running test leaving me with no logs.
Live and learn though :)
Related Content
Recent Discussions
- 15 minutes ago