You can customize the content and format of the test data that ATEasy displays in the log window or Alog control by using the following internal procedures:
SetLogString (ATEasy v5)
GetLogString retrieves the current log string while ATEasy is processing one of the ATEasy module events. The value of the log string depends on the event that is being processed. For example, if GetLogString is run while OnInitTask is being processed, the value of the current log string is the task header. In ATEasy v5, you can pass a parameter, enumALogStringType, which allow you to request a specific string - for example aLogStringTask - which will return the current task and all of its tests ran so far. Obviously, if you request the Task string at the beginning of a program, it will return an empty string; that is, the parameter has to make sense in the particular time of run.
In ATEasy v5, we provides SetLogString which allows you to set a string that you can retrieve the next call of GetLogString. This procedure is useful when the user wishes to log some tests with different formatting of the test result or the test result line. This procedure also makes things easier because the user does not need to override event (e.g., OnEndTest()) or use format log string or set log on/off. One call to SetLogString will accomplish the job.
FormatLogString lets you change the test header and modify the format of the test data to display such values as test name, test number, test results, and test status.
You could use GetLogString and FormatLogString to retrieve a log string and change it, then use the Print statement to send the altered string to the log window. For example, you might want the log window to show only test failures, or to display log data in a different format. For information on using the Print statement, see Printing to the Log and Print Statement.
ATEasy automatically sends test results to the log window. In some applications, you might want to disable ATEasy's default output to the log. For example, when the test log format provided by ATEasy is different from the one required by your application, you could suspend the automatic test log and create a custom format.
To disable ATEasy's default log output, use the SetLogOff procedure. For information on SetLogOff's syntax and a code sample, see SetLogOff Procedure.
Note: SetLogOff disables only ATEasy's default log output. SetLogOff does not disable output that is routed to the log by the Print statement or the Append method.
After disabling ATEasy's default log output, you may need to enable it again. To enable ATEasy's default log output, use the SetLogOn procedure. For information on SetLogOn's syntax and a code sample, see SetLogOn Procedure.
You can also customize log output by displaying it in HTML or text format. For more information, see Logging Test Results.
FormatLogString, GetLogString, SetLogOff, SetLogOn, SetLogSyring