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.
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 :)
- tristaanogre8 years agoEsteemed Contributor
One thing that I've been working on is constructing a data-driven framework built around a set of SQL tables. One of the requirements of this framework is that there are going to be semi-real-time indications of what is going on in the test execution. When a test run kicks off, we update a status to say it is In Progress. For each test scenario within that test run, we have individual status settings for In Progress, Passed, and Failed. We then, at the end of the run, do a roll up of the results of all those individual test cases to give an over all Passed or Failed status for the run.
Obviously, this is pretty high level and doesn't go into the detail that the TestComplete native log does, but we do get real-time monitoring of test runs. If I wanted to, I could even institute writing out details to an SQL table as a log linked back to those data records of test cases and test runs so that we could even get real-time info that way. We're not interested in that much detail, but this is something that you could achieve with relatively minor effort.
Just a thought...
Related Content
Recent Discussions
- 16 minutes ago