Forum Discussion

whuang's avatar
whuang
Regular Contributor
5 years ago
Solved

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,...
  • tristaanogre's avatar
    tristaanogre
    5 years ago

    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.