How can I export log files for project test items separately?
Hi everyone,
I was wondering if there is a way I can export log files for project test items separately?. I would like to keep a copy of the logs for the test that passed when doing regression, but it is not always so lucky that all tests can pass at once. The Log.SaveResultsAs methods exports the log files for the entire project, but I would like to export log files for project test items separately one by one, is there anyway to do that?
Thanks!
You need to make sure that the file name you present in the method has the extension. It won't automatically add the extension. So "Call Log.SaveResultsAs("C:\Users\whuang\Downloads\try.mht", lsMHT)"
For detecting if there is an error, Log.ErrCount (https://support.smartbear.com/testcomplete/docs/reference/project-objects/test-log/log/errcount.html) gives you the count of error records written to the log. So, just do a check if ErrCount > 0 for anything you want to do for errors.