ATEasy provides three internal variables whose values provide data for the ATEasy log:
Variable |
Usage |
Initially contains value of ATEasy development environment Log Window, Test Log tab control, but can be changed by user to any form log control (by assigning a value to it (i.e. Log=Form1.logMyLogWindow). ATEasy prints any log result output to this variable. |
|
Corresponds to the IDE Log Window, Test Log tab control. Not used in stand-alone ATEasy applications, since it has a value of Nothing when running the application outside of the IDE. |
|
Corresponds to the Debug Log tab in the log window in the ATEasy development environment. Not used in stand-alone ATEasy applications, since it has a value of Nothing when running the application outside of the IDE. |
These three internal variables are of the type ALog control.
The TestLog and DebugLog internal variables are constants that are set by ATEasy to the Test Log and Debug Log tab controls, respectively, of the Log window. You can use the Append method with these variables to route output to the log.
For example, the following statement writes a string to the Debug Log:
DebugLog.Append ("xyz")
or alternatively, use the trace statement to append:
trace "xyz"
Note that log output is automatically routed to the Test Log. The DebugLog variable gives you a way of specifying that debugging information be routed to the Debug Log so that the Test Log contains only test data.
When ATEasy runs an application outside of the development environment (when compiled and run EXE file), it initializes Log, TestLog, and DebugLog to Nothing and sets Log to be equal to TestLog. Some ATEasy applications, such as virtual instrument panels, require no log output, and never use the Log internal variable. In these application the value of the Log control remains nothing (that is, Log=Nothing), no log output is generated and print statements are ignored. If you are developing an ATEasy application that generates test data that the user needs to see, however, you should create a form with the ALog control. ATEasy Print statements within the application route the value of the Log variable to the form containing the ALog control.
For example, the following statement sets the Log control to be logTestExec:
Log=logTestExec
After the application makes this assignment, all Print statements and test output are routed to the application log control, LogTestExec.