Typically, when I run a testcase, I want to share the results with others. Or, more directly, when the automation run is over, have the results and the details of the run sent via email automatically to the key people who need to know if the build is good or not.

To that end, I created a whole suite of functions a long time ago (almost 2 years ago) for creating a log file. I have been using these log functions ever since rather than the 4Test Print() statement since the log functions would both record the a file and to Silk's result file. Plus, I could set append mode or note. I also liked having multiple log files - one for the basic pass/fail status and one for the details.

However, I have come to realize that the code wouldn't always do the right things. The state of the multiple log files were saved to a file during runtime. and the file was deleted when the LogEnd() function was called. Now, if something happens during the run, the cleanup doesn't always take place and the next run sometimes writes to the wrong log file. Not the intended results. Added to this that the setup was confusing as was the coding so debugging wasn't much fun.

So, what I figured was needed was a log object - then each object could have it's own properties and work on the methods separately. To that end, I wrote the attached logClass. It has all the properties and methods needed for doing log files. Doing this, the code was also streamlined, making it much easier to read and follow. I have included several additional files for doing a test.

Here is the basic information about the LogClass:

Desc:
Contains all methods necessary to manipulate log files, and logged results. The user may open any number of named logs by creating a new object of the class. The information is also log information to the Results window that is built in to Silk.

Creation Date:
06.13.2000 (original function version of this made in 1998)
Created by:
David Genrich
Icarian (http://www.icarian.com)
555 North Mathilda Avenue
Sunnyvale, CA 94086
email:* davidg@icarian.com


Public Methods and Properties:
Properties:
FileName - the file name and path for the log file.
AppendMode - boolean. Append to the log file or overwrite

Methods:
ShowProperties() - prints all properties
Destructor() - releases the object from memory
Start() - Starts a log file (based on the properties set)
Write() - main method for writing to the log file
Banner() - logs a banner
ListWrite() - logs a list of anytype
Except() - logs the exception
AllPageInfo() - logs all information in an HTML page
AppendFile() - Append a file to the log file


Check out the readme.txt for more information about installing and running the tests. Check out the LogClass_readme.txt for details on the properties and methods.

------------------
David Genrich
Icarian
555 North Mathilda Ave
Sunnyvale, CA 94086
davidg@icarian.com

[This message has been edited by davidg (edited 06-14-2000).]

[This message has been edited by davidg (edited 06-14-2000).]