cancel
Showing results for 
Search instead for 
Did you mean: 

Log functions

SOLVED
Highlighted
New 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

2 ACCEPTED SOLUTIONS

Accepted Solutions
Highlighted
New Contributor

Re: Log functions

Thanks for the fast response.

What we need is a way to log the failure of some steps of the functions with a special marking like "Requirement Failure" which can be filtered out in the log. Today the available functions are mixed with checkpoints, messages etc.. and we are looking for ways to mark specific steps as in a different way in the log than marking them in one of the available categories.
 

View solution in original post

Highlighted
Community Hero

Re: Log functions

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.


Robert Martin
[Hall of Fame]
Please consider giving a Kudo if I write good stuff
----

Why automate?  I do automated testing because there's only so much a human being can do and remain healthy.  Sleep is a requirement.  So, while people sleep, automation that I create does what I've described above in order to make sure that nothing gets past the final defense of the testing group.
I love good food, good books, good friends, and good fun.

Mysterious Gremlin Master
Vegas Thrill Rider
Extensions available

View solution in original post

3 REPLIES 3
Highlighted
Community Hero

Re: Log functions

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.


Robert Martin
[Hall of Fame]
Please consider giving a Kudo if I write good stuff
----

Why automate?  I do automated testing because there's only so much a human being can do and remain healthy.  Sleep is a requirement.  So, while people sleep, automation that I create does what I've described above in order to make sure that nothing gets past the final defense of the testing group.
I love good food, good books, good friends, and good fun.

Mysterious Gremlin Master
Vegas Thrill Rider
Extensions available
Highlighted
New Contributor

Re: Log functions

Thanks for the fast response.

What we need is a way to log the failure of some steps of the functions with a special marking like "Requirement Failure" which can be filtered out in the log. Today the available functions are mixed with checkpoints, messages etc.. and we are looking for ways to mark specific steps as in a different way in the log than marking them in one of the available categories.
 

View solution in original post

Highlighted
Community Hero

Re: Log functions

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.


Robert Martin
[Hall of Fame]
Please consider giving a Kudo if I write good stuff
----

Why automate?  I do automated testing because there's only so much a human being can do and remain healthy.  Sleep is a requirement.  So, while people sleep, automation that I create does what I've described above in order to make sure that nothing gets past the final defense of the testing group.
I love good food, good books, good friends, and good fun.

Mysterious Gremlin Master
Vegas Thrill Rider
Extensions available

View solution in original post

New Here?
Join us and watch the welcome video:
Announcements
Top Kudoed Authors