Aurore
6 years agoNew Contributor
Log functions
Hello,
Can we define another Log function than existing ones (Checkpoint, Error, Event, Message and Warning) which could be displayed in Test results ?
Aurore
Hello,
Can we define another Log function than existing ones (Checkpoint, Error, Event, Message and Warning) which could be displayed in Test results ?
Aurore
Can we log a short message to this window?
I have a script that is doing a lot in the background. While it is running it looks like it is hung or crashed. While the script is rebuilding the object tree or doing lots of database stuff the tester might interfere with the script.
Thank you, BMD
You can use the action Push and Pop Indicator Text, all it does is change the text in that little box, it will not be logged:
For scripts:
https://support.smartbear.com/testcomplete/docs/reference/program-objects/indicator/pushtext.html
Thanks - it works (but does not stay).
It just flashes on the screen. The script is doing a lot of database work and this would need to be reshown after each of hundreds of database updates. THANK YOU. I did not know about this option - but - I'm thinking of using a UserForm that will show the note while the script continues to run.
Thanks Again, BMD
No. Log is an object in TestComplete and is not something that you can alter to add additional functions. TestComplete does not allow for modification of such objects.
What do you need in the way of logging that is not provided? What are you wanting to achieve in an output? Perhaps there are ways of doing what you want that don't involve creating new log functions.
Thanks for the fast response.
You can still use Log.Message, Log.Warning, or Log.Error for that. What you would need to do, though, to distinguish it is change the Log Attributes of your message. Things like priority, color, etc., will make those items stand out.
As a tester, I would use Log.Warning to warn that, while the automation completed, there was something that was incorrect in the completion. The fourth parameter in the Log.Warning method is where you would pass in a LogAttributes object with the different settings. You can also set the priority (3rd parameter) to distinguish it from other warnings.