Writing log messages of test to the file
- 5 years ago
the log.error and log.message operations will only output the corresponding messages to the log files that testcomplete generates. as I'm sure you've observed, within the test logs within the corresponding test step location, you should see those messages populate.
if you wanted to store your test logs in a separate location, you could use log.saveresultas to output the testcomplete logs to a target directory in a supported format (html, mht, and xml), but this wouldn't be a text file.
-----------
if we wanted to generate a text file each time a test run fails or passes, you would most likely use the aqfile.writetotextfile operation (https://support.smartbear.com/testcomplete/docs/reference/program-objects/aqfile/writetotextfile.html) based on either conditional statements or event handlers