Forum Discussion
- sanjay0288Frequent Contributor
Hi nandini9,
How are you calling Log.SaveResults as method. What you need to do add General Events-> And call the Log.SaveResultsAs method in OnStopTest events handler. I have attached a sample mht file generated using this method for a failed scenario. Hope this might be of some help
- nandini9Occasional Contributor
Thanks Sanjay...This works for me
- tristaanogreEsteemed Contributor
TestComplete creates log entries for everything that the tests do, assuming that the actions record a log entry. When the test stops, there should be at least an error record in the log.
What is probably happening is that the log is not written to disk yet when you call your Log.SaveResultsAs method. Go to Tools -> Current Project Properties-> Playback. There should be an option for "Save Log every ___ minutes". Set that to "1" minute. This is a pretty agressive timing so there may be some performance hit in your test run. However, this will make sure that the test log is written to disk at least every 60 seconds.
Another option is that, before you call "Log.SaveResultsAs", first call the method Log.SaveToDisk. This will immediately flush the log to the disk.
Give either of those two options a try and see what that does for you.
- sanjay0288Frequent Contributor
Related Content
- 12 years ago
- 4 years ago
- 9 years ago
- 7 years ago
Recent Discussions
- 3 days ago
- 3 days ago
- 7 days ago